Package io.vertx.mutiny.ext.web.handler
Class OtpAuthHandler
java.lang.Object
io.vertx.mutiny.ext.web.handler.OtpAuthHandler
- All Implemented Interfaces:
MutinyDelegate,io.vertx.core.Handler<RoutingContext>,AuthenticationHandler,Consumer<RoutingContext>
public class OtpAuthHandler
extends Object
implements AuthenticationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>, MutinyDelegate
An auth handler that provides One Time Password (Multi-Factor) Authentication support.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Paulo Lopes
- See Also:
-
OtpAuthHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vertx.mutiny.ext.web.handler.AuthenticationHandler
AuthenticationHandler.AuthenticationHandlerImpl -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOtpAuthHandler(io.vertx.ext.web.handler.OtpAuthHandler delegate) Create a new instance ofOtpAuthHandlerdelegating to the given (non-null) instance ofOtpAuthHandler.OtpAuthHandler(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(RoutingContext item) Handle an item.static OtpAuthHandlerCreate a new instance of this handler using a hash based one time password authentication provider.static OtpAuthHandlerCreate a new instance of this handler using a time based one time password authentication provider.booleanio.vertx.ext.web.handler.OtpAuthHandlerGet the delegate instance.voidhandle(RoutingContext item) Handle an item.inthashCode()Configure theissuervalue to be shown in the authenticator URL.Configure thelabelvalue to be shown in the authenticator URL.static OtpAuthHandlernewInstance(io.vertx.ext.web.handler.OtpAuthHandler delegate) Creates a new instance of theOtpAuthHandler.setupCallback(Route route) Setup the required route where authenticators to submit the challenge response.setupRegisterCallback(Route route) Setup the optional route where authenticators are allowed to register.toString()Specify the URL where requests are to be redirected when a user is already known in the request.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
OtpAuthHandler
public OtpAuthHandler(io.vertx.ext.web.handler.OtpAuthHandler delegate) Create a new instance ofOtpAuthHandlerdelegating to the given (non-null) instance ofOtpAuthHandler. -
OtpAuthHandler
-
-
Method Details
-
accept
Handle an item. This method is generated from theoriginalmethod."- Specified by:
acceptin interfaceAuthenticationHandler- Specified by:
acceptin interfaceConsumer<RoutingContext>
-
handle
Handle an item. This method is generated from theoriginalmethod."- Specified by:
handlein interfaceAuthenticationHandler- Specified by:
handlein interfaceio.vertx.core.Handler<RoutingContext>
-
getDelegate
public io.vertx.ext.web.handler.OtpAuthHandler 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 interfaceAuthenticationHandler- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
create
Create a new instance of this handler using a time based one time password authentication provider.- Parameters:
totpAuth- the time based OTP provider.- Returns:
- new instance of the handler.
-
create
Create a new instance of this handler using a hash based one time password authentication provider.- Parameters:
hotpAuth- the hash based OTP provider.- Returns:
- new instance of the handler.
-
verifyUrl
Specify the URL where requests are to be redirected when a user is already known in the request. A user is already known when theUserContext#get()is notnull. If no redirect is provided, requests are terminated immediately with status code401.- Parameters:
url- the location where users are to be asked for the OTP code.- Returns:
- fluent self.
-
setupRegisterCallback
Setup the optional route where authenticators are allowed to register. Registration is only allowed on requests with a valid user. A user is valid when theUserContext#get()is notnull.- Parameters:
route- the location where users are to register new authenticator devices/apps.- Returns:
- fluent self.
-
setupCallback
Setup the required route where authenticators to submit the challenge response. Challenges are only allowed on requests with a valid user. A user is valid when theUserContext#get()is notnull.- Parameters:
route- the location where users are to submit challenge responses from authenticator devices/apps.- Returns:
- fluent self.
-
issuer
Configure theissuervalue to be shown in the authenticator URL.- Parameters:
issuer- aStringfor exampleVert.x OTP- Returns:
- fluent self.
-
label
Configure thelabelvalue to be shown in the authenticator URL. When this value is provided it will overwrite the default label which is composed of theissuerand the currentuserid.- Parameters:
label- aStringfor exampleVert.x OTP- Returns:
- fluent self.
-
newInstance
Creates a new instance of theOtpAuthHandler. -
hashCode
public int hashCode() -
equals
-
toString
-