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 MutinyDelegate, AuthenticationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
Handler that handles login from a form on a custom login page.
Used in conjunction with the RedirectAuthHandler.
original non Mutiny-ified interface using Vert.x codegen.-
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) FormLoginHandler(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(RoutingContext item) static FormLoginHandlercreate(AuthenticationProvider authProvider) static FormLoginHandlercreate(AuthenticationProvider authProvider, String usernameParam, String passwordParam, String returnURLParam, String directLoggedInOKURL) booleanio.vertx.ext.web.handler.FormLoginHandlervoidhandle(RoutingContext arg0) inthashCode()static FormLoginHandlernewInstance(io.vertx.ext.web.handler.FormLoginHandler arg) setDirectLoggedInOKURL(String directLoggedInOKURL) setPasswordParam(String passwordParam) setReturnURLParam(String returnURLParam) setUsernameParam(String usernameParam) toString()
-
Field Details
-
__TYPE_ARG
-
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:
-
-
Constructor Details
-
FormLoginHandler
public FormLoginHandler(io.vertx.ext.web.handler.FormLoginHandler delegate) -
FormLoginHandler
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.handler.FormLoginHandler getDelegate()- Specified by:
getDelegatein interfaceAuthenticationHandler- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
handle
- Specified by:
handlein interfaceAuthenticationHandler- Specified by:
handlein interfaceio.vertx.core.Handler<RoutingContext>
-
create
- 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) - 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
- Parameters:
usernameParam- the name of the param- Returns:
- a reference to this for a fluent API
-
setPasswordParam
- Parameters:
passwordParam- the name of the param- Returns:
- a reference to this for a fluent API
-
setReturnURLParam
- Parameters:
returnURLParam- the name of the param- Returns:
- a reference to this for a fluent API
-
setDirectLoggedInOKURL
- Parameters:
directLoggedInOKURL- the URL to redirect to- Returns:
- a reference to this for a fluent API
-
accept
- Specified by:
acceptin interfaceAuthenticationHandler- Specified by:
acceptin interfaceConsumer<RoutingContext>
-
newInstance
-