Package: io.vertx.groovy.ext.auth.common

## [Groovy] Class AuthProvider

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

- User-facing interface for authenticating users.

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `io.vertx.ext.auth.AuthProvider` | `delegate`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `AuthProvider (io.vertx.ext.auth.AuthProvider delegate)`

  - ### Methods Summary

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

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Property Detail

    - #### final io.vertx.ext.auth.AuthProvider delegate

  - ### Constructor Detail

    - #### AuthProvider(io.vertx.ext.auth.AuthProvider delegate)

  - ### Method Detail

    - #### void authenticate(java.util.Map<java.lang.String, java.lang.Object> authInfo, io.vertx.core.Handler<io.vertx.core.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.core.AsyncResult. The user object can then be used for authorisation.

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

    - #### java.lang.Object getDelegate()