io.vertx.ext.web.handler

## Interface FormLoginHandler

- All Superinterfaces:
    Handler<RoutingContext>

      public interface FormLoginHandler
      extends Handler<RoutingContext>

  Handler that handles login from a form on a custom login page.

  Used in conjunction with the `RedirectAuthHandler`.

  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_PASSWORD_PARAM` The default value of the form attribute which will contain the password
    `static String` | `DEFAULT_RETURN_URL_PARAM` The default value of the session attribute which will contain the return url
    `static String` | `DEFAULT_USERNAME_PARAM` The default value of the form attribute which will contain the username

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static FormLoginHandler` | `create(AuthProvider authProvider)` Create a handler
    `static FormLoginHandler` | `create(AuthProvider authProvider, String usernameParam, String passwordParam, String returnURLParam, String directLoggedInOKURL)` Create a handler
    `FormLoginHandler` | `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 first
    `FormLoginHandler` | `setPasswordParam(String passwordParam)` Set the name of the form param used to submit the password
    `FormLoginHandler` | `setReturnURLParam(String returnURLParam)` Set the name of the session attrioute used to specify the return url
    `FormLoginHandler` | `setUsernameParam(String usernameParam)` Set the name of the form param used to submit the username

    - ### Methods inherited from interface io.vertx.core.Handler

      `handle`

- - ### Field Detail

    - #### DEFAULT_USERNAME_PARAM

          static final String DEFAULT_USERNAME_PARAM

      The default value of the form attribute which will contain the username
      See Also:
        Constant Field Values

    - #### DEFAULT_PASSWORD_PARAM

          static final String DEFAULT_PASSWORD_PARAM

      The default value of the form attribute which will contain the password
      See Also:
        Constant Field Values

    - #### DEFAULT_RETURN_URL_PARAM

          static final String DEFAULT_RETURN_URL_PARAM

      The default value of the session attribute which will contain the return url
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### create

          static FormLoginHandler create(AuthProvider authProvider)

      Create a handler
      Parameters:
        `authProvider` - the auth service to use
      Returns:
        the handler

    - #### create

          static FormLoginHandler create(AuthProvider authProvider,
                                         String usernameParam,
                                         String passwordParam,
                                         String returnURLParam,
                                         String directLoggedInOKURL)

      Create a handler
      Parameters:
        `authProvider` - the auth service to use
        `usernameParam` - the value of the form attribute which will contain the username
        `passwordParam` - the value of the form attribute which will contain the password
        `returnURLParam` - the value of the session attribute which will contain the return url
        `directLoggedInOKURL` - 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

          FormLoginHandler setUsernameParam(String usernameParam)

      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

          FormLoginHandler setPasswordParam(String passwordParam)

      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

          FormLoginHandler setReturnURLParam(String returnURLParam)

      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

          FormLoginHandler 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 first
      Parameters:
        `directLoggedInOKURL` - the URL to redirect to
      Returns:
        a reference to this for a fluent API

Copyright © 2019 Eclipse. All rights reserved.