io.vertx.rxjava.ext.auth

## Class AuthProvider

- java.lang.Object
- - io.vertx.rxjava.ext.auth.AuthProvider

- Direct Known Subclasses:
    ChainAuth, HtdigestAuth, HtpasswdAuth, JDBCAuth, JWTAuth, MongoAuth, OAuth2Auth, ShiroAuth

      public class AuthProvider
      extends Object

  User-facing interface for authenticating users.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<AuthProvider>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthProvider(AuthProvider delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `authenticate(JsonObject authInfo, Handler<AsyncResult<User>> resultHandler)` Authenticate a user.
    `Observable<User>` | `authenticateObservable(JsonObject authInfo)` Deprecated. use `rxAuthenticate(io.vertx.core.json.JsonObject)` instead
    `boolean` | `equals(Object o)`
    `AuthProvider` | `getDelegate()`
    `int` | `hashCode()`
    `static AuthProvider` | `newInstance(AuthProvider arg)`
    `Single<User>` | `rxAuthenticate(JsonObject authInfo)` Authenticate a user.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<AuthProvider> __TYPE_ARG

  - ### Constructor Detail

    - #### AuthProvider

          public AuthProvider(AuthProvider delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public AuthProvider getDelegate()

    - #### authenticate

          public void authenticate(JsonObject 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 `AsyncResult`. The user object can then be used for authorisation.

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

    - #### authenticateObservable

          @Deprecated
          public Observable<User> authenticateObservable(JsonObject authInfo)

      Deprecated. use `rxAuthenticate(io.vertx.core.json.JsonObject)` instead
      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 `AsyncResult`. The user object can then be used for authorisation.

      Parameters:
        `authInfo` - The auth information
      Returns:

    - #### rxAuthenticate

          public Single<User> rxAuthenticate(JsonObject authInfo)

      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 `AsyncResult`. The user object can then be used for authorisation.

      Parameters:
        `authInfo` - The auth information
      Returns:

    - #### newInstance

          public static AuthProvider newInstance(AuthProvider arg)

Copyright © 2019 Eclipse. All rights reserved.