Class TotpAuth
- java.lang.Object
-
- io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
-
- io.vertx.mutiny.ext.auth.otp.totp.TotpAuth
-
public class TotpAuth extends AuthenticationProvider
An extension of AuthProvider which uses the one time passwords based on time to perform authentication. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<TotpAuth>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TotpAuth
authenticatorFetcher(Function<String,io.smallrye.mutiny.Uni<io.vertx.ext.auth.otp.Authenticator>> fetcher)
TotpAuth
authenticatorUpdater(Function<io.vertx.ext.auth.otp.Authenticator,io.smallrye.mutiny.Uni<Void>> updater)
static TotpAuth
create()
static TotpAuth
create(io.vertx.ext.auth.otp.totp.TotpAuthOptions totpAuthOptions)
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.Authenticator
createAuthenticatorAndAwait(String id, io.vertx.ext.auth.otp.OtpKey otpKey)
Blocking variant ofcreateAuthenticator(String,OtpKey)
.void
createAuthenticatorAndForget(String id, io.vertx.ext.auth.otp.OtpKey otpKey)
Variant ofcreateAuthenticator(String,OtpKey)
that ignores the result of the operation.boolean
equals(Object o)
String
generateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String label)
String
generateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String issuer, String user)
String
generateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String issuer, String user, String label)
io.vertx.ext.auth.otp.totp.TotpAuth
getDelegate()
int
hashCode()
static TotpAuth
newInstance(io.vertx.ext.auth.otp.totp.TotpAuth arg)
String
toString()
-
Methods inherited from class io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
authenticate, authenticate, authenticateAndAwait, authenticateAndAwait, authenticateAndForget, authenticateAndForget, newInstance
-
-
-
-
Constructor Detail
-
TotpAuth
public TotpAuth(io.vertx.ext.auth.otp.totp.TotpAuth delegate)
-
TotpAuth
public TotpAuth(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.auth.otp.totp.TotpAuth getDelegate()
- Overrides:
getDelegate
in classAuthenticationProvider
-
toString
public String toString()
- Overrides:
toString
in classAuthenticationProvider
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAuthenticationProvider
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAuthenticationProvider
-
authenticatorFetcher
public TotpAuth authenticatorFetcher(Function<String,io.smallrye.mutiny.Uni<io.vertx.ext.auth.otp.Authenticator>> fetcher)
- Parameters:
fetcher
- fetcher function.- Returns:
- fluent self.
-
authenticatorUpdater
public TotpAuth authenticatorUpdater(Function<io.vertx.ext.auth.otp.Authenticator,io.smallrye.mutiny.Uni<Void>> updater)
- Parameters:
updater
- updater function.- Returns:
- fluent self.
-
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
. Don't forget to subscribe on it to trigger the operation.- Parameters:
id
- id user.otpKey
- key of user used for auth.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
createAuthenticatorAndAwait
public io.vertx.ext.auth.otp.Authenticator createAuthenticatorAndAwait(String id, io.vertx.ext.auth.otp.OtpKey otpKey)
Blocking variant ofcreateAuthenticator(String,OtpKey)
.This method waits 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 a RuntimeException).
- Parameters:
id
- id user.otpKey
- key of user used for auth.- Returns:
- the Authenticator instance produced by the operation.
-
createAuthenticatorAndForget
public void createAuthenticatorAndForget(String id, io.vertx.ext.auth.otp.OtpKey otpKey)
Variant ofcreateAuthenticator(String,OtpKey)
that ignores the result of the operation.This method subscribes on the result of
createAuthenticator(String,OtpKey)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateAuthenticator(String,OtpKey)
but you don't need to compose it with other operations.- Parameters:
id
- id user.otpKey
- key of user used for auth.
-
generateUri
public String generateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String issuer, String user, String label)
- 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
public String generateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String issuer, String user)
- Parameters:
otpKey
- user key.issuer
- issuer of key.user
- display name of user account.- Returns:
- uri containing the key.
-
generateUri
public String generateUri(io.vertx.ext.auth.otp.OtpKey otpKey, String label)
- Parameters:
otpKey
- user key.label
- the label to identify which account a key is associated with.- Returns:
- uri containing the key.
-
create
public static TotpAuth create(io.vertx.ext.auth.otp.totp.TotpAuthOptions totpAuthOptions)
- Parameters:
totpAuthOptions
- the config.- Returns:
- the created instance of
TotpAuth
.
-
newInstance
public static TotpAuth newInstance(io.vertx.ext.auth.otp.totp.TotpAuth arg)
-
-