Package: io.vertx.groovy.ext.web.handler

## [Groovy] Class FormLoginHandler

- io.vertx.groovy.ext.web.handler.FormLoginHandler

- All Implemented Interfaces and Traits:
    Handler

      @CompileStatic
      class FormLoginHandler

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

  Used in conjunction with the RedirectAuthHandler.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `FormLoginHandler (Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name 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
    `Object` | `getDelegate()`
    `void` | `handle(RoutingContext arg0)`
    `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

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### FormLoginHandler(Object delegate)

  - ### Method Detail

    - #### static FormLoginHandler create(AuthProvider authProvider)

      Create a handler

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

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

      Create a handler

      Returns:
        the 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

    - #### Object getDelegate()

    - #### void handle(RoutingContext arg0)

    - #### 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

      Returns:
        a reference to this for a fluent API
      Parameters:
        `directLoggedInOKURL` - the URL to redirect to

    - #### FormLoginHandler setPasswordParam(String passwordParam)

      Set the name of the form param used to submit the password

      Returns:
        a reference to this for a fluent API
      Parameters:
        `passwordParam` - the name of the param

    - #### FormLoginHandler setReturnURLParam(String returnURLParam)

      Set the name of the session attrioute used to specify the return url

      Returns:
        a reference to this for a fluent API
      Parameters:
        `returnURLParam` - the name of the param

    - #### FormLoginHandler setUsernameParam(String usernameParam)

      Set the name of the form param used to submit the username

      Returns:
        a reference to this for a fluent API
      Parameters:
        `usernameParam` - the name of the param