Class TotpAuth
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Dmitry Novikov
- See Also:
-
TotpAuth
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<User>authenticate(io.vertx.ext.auth.authentication.Credentials credentials) Authenticate a user.authenticateAndAwait(io.vertx.ext.auth.authentication.Credentials credentials) Authenticate a user.authenticateAndForget(io.vertx.ext.auth.authentication.Credentials credentials) Authenticate a user.authenticatorFetcher(Function<String, io.smallrye.mutiny.Uni<io.vertx.ext.auth.otp.Authenticator>> fetcher) authenticatorUpdater(Function<io.vertx.ext.auth.otp.Authenticator, io.smallrye.mutiny.Uni<Void>> updater) Provide aFunctionthat can update or insert aAuthenticator.static TotpAuthcreate()Creates an instance of TotpAuth.static TotpAuthcreate(io.vertx.ext.auth.otp.totp.TotpAuthOptions totpAuthOptions) Creates an instance of TotpAuth.io.smallrye.mutiny.Uni<io.vertx.ext.auth.otp.Authenticator>createAuthenticator(String id, io.vertx.ext.auth.otp.OtpKey otpKey) Creating authenticator from user id and key.io.vertx.ext.auth.otp.AuthenticatorcreateAuthenticatorAndAwait(String id, io.vertx.ext.auth.otp.OtpKey otpKey) Creating authenticator from user id and key.createAuthenticatorAndForget(String id, io.vertx.ext.auth.otp.OtpKey otpKey) Creating authenticator from user id and key.booleangenerateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String label) Creating URI for register in key in user device.generateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String issuer, String user) Creating URI for register in key in user device.generateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String issuer, String user, String label) Creating URI for register in key in user device.io.vertx.ext.auth.otp.totp.TotpAuthGet the delegate instance.inthashCode()static TotpAuthnewInstance(io.vertx.ext.auth.otp.totp.TotpAuth delegate) Creates a new instance of theTotpAuth.toString()Methods inherited from class io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
newInstance
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
TotpAuth
public TotpAuth(io.vertx.ext.auth.otp.totp.TotpAuth delegate) Create a new instance ofTotpAuthdelegating to the given (non-null) instance ofTotpAuth. -
TotpAuth
-
-
Method Details
-
getDelegate
public io.vertx.ext.auth.otp.totp.TotpAuth getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Overrides:
getDelegatein classAuthenticationProvider- Returns:
- the delegate instance
-
createAuthenticator
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.auth.otp.Authenticator> createAuthenticator(String id, io.vertx.ext.auth.otp.OtpKey otpKey) Creating authenticator from user id and key.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
id- id user.otpKey- key of user used for auth.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
TotpAuth.createAuthenticator(String, OtpKey)
-
createAuthenticatorAndAwait
public io.vertx.ext.auth.otp.Authenticator createAuthenticatorAndAwait(String id, io.vertx.ext.auth.otp.OtpKey otpKey) Creating authenticator from user id and key.Unlike the bare Vert.x variant, this method returns a
Authenticator. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
id- id user.otpKey- key of user used for auth.- Returns:
- The operation result
- See Also:
-
TotpAuth.createAuthenticator(String, OtpKey)
-
createAuthenticatorAndForget
Creating authenticator from user id and key.Unlike the bare Vert.x variant, this method ignores the
Authenticatorresult or any failure.- Parameters:
id- id user.otpKey- key of user used for auth.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
TotpAuth.createAuthenticator(String, OtpKey)
-
authenticate
@CheckReturnValue public io.smallrye.mutiny.Uni<User> authenticate(io.vertx.ext.auth.authentication.Credentials credentials) Authenticate a user.The first argument is a Credentials object containing information for authenticating the user. What this actually contains depends on the specific implementation.
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
authenticatein classAuthenticationProvider- Parameters:
credentials- The credentials- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
AuthenticationProvider.authenticate(Credentials)
-
authenticateAndAwait
Authenticate a user.The first argument is a Credentials object containing information for authenticating the user. What this actually contains depends on the specific implementation.
Unlike the bare Vert.x variant, this method returns a
User. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
authenticateAndAwaitin classAuthenticationProvider- Parameters:
credentials- The credentials- Returns:
- The operation result
- See Also:
-
AuthenticationProvider.authenticate(Credentials)
-
authenticateAndForget
Authenticate a user.The first argument is a Credentials object containing information for authenticating the user. What this actually contains depends on the specific implementation.
Unlike the bare Vert.x variant, this method ignores the
Userresult or any failure.- Overrides:
authenticateAndForgetin classAuthenticationProvider- Parameters:
credentials- The credentials- Returns:
- The current instance to chain operations if needed.
- See Also:
-
AuthenticationProvider.authenticate(Credentials)
-
authenticatorFetcher
public TotpAuth authenticatorFetcher(Function<String, io.smallrye.mutiny.Uni<io.vertx.ext.auth.otp.Authenticator>> fetcher) Provide aFunctionthat can fetchAuthenticators from a backend given anidentifierargument.The function signature is as follows:
(id) -> Future<Authenticator>idthe identifier to lookup.Futureasync result with a authenticator.
- Parameters:
fetcher- fetcher function.- Returns:
- fluent self.
-
authenticatorUpdater
public TotpAuth authenticatorUpdater(Function<io.vertx.ext.auth.otp.Authenticator, io.smallrye.mutiny.Uni<Void>> updater) Provide aFunctionthat can update or insert aAuthenticator. The function should store a given authenticator to a persistence storage.When an authenticator is already present, this method must at least update
Authenticator.getCounter(), and is not required to perform any other update.For new authenticators, the whole object data must be persisted.
The function signature is as follows:
(Authenticator) -> Future<Void>Authenticatorthe authenticator data to update.Futureasync result of the operation.
- Parameters:
updater- updater function.- Returns:
- fluent self.
-
generateUri
public String generateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String issuer, String user, String label) Creating URI for register in key in user device.- Parameters:
otpKey- user key.issuer- issuer of key.user- display name of user account.label- the label to identify which account a key is associated with.- Returns:
- uri containing the key.
-
generateUri
Creating URI for register in key in user device.- Parameters:
otpKey- user key.issuer- issuer of key.user- display name of user account.- Returns:
- uri containing the key.
-
generateUri
Creating URI for register in key in user device.- Parameters:
otpKey- user key.label- the label to identify which account a key is associated with.- Returns:
- uri containing the key.
-
create
Creates an instance of TotpAuth.- Returns:
- the created instance of
TotpAuth.
-
create
Creates an instance of TotpAuth.- Parameters:
totpAuthOptions- the config.- Returns:
- the created instance of
TotpAuth.
-
newInstance
Creates a new instance of theTotpAuth. -
hashCode
public int hashCode()- Overrides:
hashCodein classAuthenticationProvider
-
equals
- Overrides:
equalsin classAuthenticationProvider
-
toString
- Overrides:
toStringin classAuthenticationProvider
-