Package io.vertx.mutiny.ext.web.handler
Class FormLoginHandler
java.lang.Object
io.vertx.mutiny.ext.web.handler.FormLoginHandler
- All Implemented Interfaces:
MutinyDelegate,io.vertx.core.Handler<RoutingContext>,AuthenticationHandler,Consumer<RoutingContext>
public class FormLoginHandler
extends Object
implements AuthenticationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>, MutinyDelegate
Handler that handles login from a form on a custom login page.
Used in conjunction with the RedirectAuthHandler.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Tim Fox
- See Also:
-
FormLoginHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vertx.mutiny.ext.web.handler.AuthenticationHandler
AuthenticationHandler.AuthenticationHandlerImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<FormLoginHandler>static final StringThe default value of the form attribute which will contain the passwordstatic final StringThe default value of the session attribute which will contain the return urlstatic final StringThe default value of the form attribute which will contain the username -
Constructor Summary
ConstructorsConstructorDescriptionFormLoginHandler(io.vertx.ext.web.handler.FormLoginHandler delegate) Create a new instance ofFormLoginHandlerdelegating to the given (non-null) instance ofFormLoginHandler.FormLoginHandler(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(RoutingContext item) Handle an item.static FormLoginHandlercreate(AuthenticationProvider authProvider) Create a handlerstatic FormLoginHandlercreate(AuthenticationProvider authProvider, String usernameParam, String passwordParam, String returnURLParam, String directLoggedInOKURL) Create a handlerbooleanio.vertx.ext.web.handler.FormLoginHandlerGet the delegate instance.voidhandle(RoutingContext item) Handle an item.inthashCode()static FormLoginHandlernewInstance(io.vertx.ext.web.handler.FormLoginHandler delegate) Creates a new instance of theFormLoginHandler.setDirectLoggedInOKURL(String directLoggedInOKURL) Set the url to redirect to if the user logs in directly at the url of the form login handler without being redirected here firstsetPasswordParam(String passwordParam) Set the name of the form param used to submit the passwordsetReturnURLParam(String returnURLParam) Set the name of the session attrioute used to specify the return urlsetUsernameParam(String usernameParam) Set the name of the form param used to submit the usernametoString()
-
Field Details
-
DEFAULT_USERNAME_PARAM
The default value of the form attribute which will contain the username- See Also:
-
DEFAULT_PASSWORD_PARAM
The default value of the form attribute which will contain the password- See Also:
-
DEFAULT_RETURN_URL_PARAM
The default value of the session attribute which will contain the return url- See Also:
-
__TYPE_ARG
-
-
Constructor Details
-
FormLoginHandler
public FormLoginHandler(io.vertx.ext.web.handler.FormLoginHandler delegate) Create a new instance ofFormLoginHandlerdelegating to the given (non-null) instance ofFormLoginHandler. -
FormLoginHandler
-
-
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.FormLoginHandler 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 handler- Parameters:
authProvider- the auth service to use- Returns:
- the handler
-
create
public static FormLoginHandler create(AuthenticationProvider authProvider, String usernameParam, String passwordParam, String returnURLParam, String directLoggedInOKURL) Create a handler- Parameters:
authProvider- the auth service to useusernameParam- the value of the form attribute which will contain the usernamepasswordParam- the value of the form attribute which will contain the passwordreturnURLParam- the value of the session attribute which will contain the return urldirectLoggedInOKURL- a url to redirect to if the user logs in directly at the url of the form login handler without being redirected here first- Returns:
- the handler
-
setUsernameParam
Set the name of the form param used to submit the username- Parameters:
usernameParam- the name of the param- Returns:
- a reference to this for a fluent API
-
setPasswordParam
Set the name of the form param used to submit the password- Parameters:
passwordParam- the name of the param- Returns:
- a reference to this for a fluent API
-
setReturnURLParam
Set the name of the session attrioute used to specify the return url- Parameters:
returnURLParam- the name of the param- Returns:
- a reference to this for a fluent API
-
setDirectLoggedInOKURL
Set the url to redirect to if the user logs in directly at the url of the form login handler without being redirected here first- Parameters:
directLoggedInOKURL- the URL to redirect to- Returns:
- a reference to this for a fluent API
-
newInstance
Creates a new instance of theFormLoginHandler. -
hashCode
public int hashCode() -
equals
-
toString
-