Package: io.vertx.groovy.ext.auth

## [Groovy] Class AuthProvider

- io.vertx.groovy.ext.auth.AuthProvider

- User-facing interface for authenticating users.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `AuthProvider (Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `authenticate(Map<String, Object> authInfo, Handler<AsyncResult<User>> resultHandler)` Authenticate a user.
    `Object` | `getDelegate()`

  - ### Inherited Methods Summary

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

- - ### Constructor Detail

    - #### AuthProvider(Object delegate)

  - ### Method Detail

    - #### void authenticate(Map<String, Object> authInfo, Handler<AsyncResult<User>> resultHandler)

      Authenticate a user.

      The first argument is a JSON object containing information for authenticating the user. What this actually contains depends on the specific implementation. In the case of a simple username/password based authentication it is likely to contain a JSON object with the following structure:

             {
               "username": "tim",
               "password": "mypassword"
             }

      For other types of authentication it contain different information - for example a JWT token or OAuth bearer token.

      If the user is successfully authenticated a User object is passed to the handler in an io.vertx.groovy.core.AsyncResult. The user object can then be used for authorisation.

      Parameters:
        `authInfo` - The auth information
        `resultHandler` - The result handler

    - #### Object getDelegate()