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 String
The default value of the form attribute which will contain the passwordstatic final String
The default value of the session attribute which will contain the return urlstatic final String
The 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 TypeMethodDescriptionvoid
accept
(RoutingContext item) static FormLoginHandler
create
(AuthenticationProvider authProvider) static FormLoginHandler
create
(AuthenticationProvider authProvider, String usernameParam, String passwordParam, String returnURLParam, String directLoggedInOKURL) boolean
io.vertx.ext.web.handler.FormLoginHandler
void
handle
(RoutingContext arg0) int
hashCode()
static FormLoginHandler
newInstance
(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:
getDelegate
in interfaceAuthenticationHandler
- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
handle
- Specified by:
handle
in interfaceAuthenticationHandler
- Specified by:
handle
in 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:
accept
in interfaceAuthenticationHandler
- Specified by:
accept
in interfaceConsumer<RoutingContext>
-
newInstance
-