io.vertx.reactivex.ext.auth.oauth2

## Class OAuth2Auth

- java.lang.Object
- - io.vertx.reactivex.ext.auth.AuthProvider
  - - io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth

-     public class OAuth2Auth
      extends AuthProvider

  Factory interface for creating OAuth2 based `AuthProvider` instances.

  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<OAuth2Auth>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuth2Auth(OAuth2Auth delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `authorizeURL(JsonObject params)` Generate a redirect URL to the authN/Z backend.
    `static OAuth2Auth` | `create(Vertx vertx)` Create a OAuth2 auth provider
    `static OAuth2Auth` | `create(Vertx vertx, OAuth2ClientOptions config)` Create a OAuth2 auth provider
    `static OAuth2Auth` | `create(Vertx vertx, OAuth2FlowType flow)` Deprecated.
    `static OAuth2Auth` | `create(Vertx vertx, OAuth2FlowType flow, OAuth2ClientOptions config)` Deprecated.
    `static OAuth2Auth` | `createKeycloak(Vertx vertx, OAuth2FlowType flow, JsonObject config)` Deprecated.
    `OAuth2Auth` | `decodeToken(String token, Handler<AsyncResult<AccessToken>> handler)` Deprecated.
    `boolean` | `equals(Object o)`
    `OAuth2Auth` | `getDelegate()`
    `OAuth2FlowType` | `getFlowType()` Returns the configured flow type for the Oauth2 provider.
    `String` | `getScopeSeparator()` Deprecated.
    `void` | `getToken(JsonObject params, Handler<AsyncResult<AccessToken>> handler)` Deprecated.
    `int` | `hashCode()`
    `OAuth2Auth` | `introspectToken(String token, Handler<AsyncResult<AccessToken>> handler)` Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
    `OAuth2Auth` | `introspectToken(String token, String tokenType, Handler<AsyncResult<AccessToken>> handler)` Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
    `OAuth2Auth` | `loadJWK(Handler<AsyncResult<Void>> handler)` Loads a JWK Set from the remote provider.
    `static OAuth2Auth` | `newInstance(OAuth2Auth arg)`
    `OAuth2Auth` | `rbacHandler(OAuth2RBAC rbac)`
    `Single<AccessToken>` | `rxDecodeToken(String token)` Deprecated.
    `Single<AccessToken>` | `rxGetToken(JsonObject params)` Deprecated.
    `Single<AccessToken>` | `rxIntrospectToken(String token)` Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
    `Single<AccessToken>` | `rxIntrospectToken(String token, String tokenType)` Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
    `Completable` | `rxLoadJWK()` Loads a JWK Set from the remote provider.
    `String` | `toString()`

    - ### Methods inherited from class io.vertx.reactivex.ext.auth.AuthProvider

      `authenticate, newInstance, rxAuthenticate`

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

  - ### Constructor Detail

    - #### OAuth2Auth

          public OAuth2Auth(OAuth2Auth delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `AuthProvider`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `AuthProvider`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `AuthProvider`

    - #### getDelegate

          public OAuth2Auth getDelegate()

      Overrides:
        `getDelegate` in class `AuthProvider`

    - #### createKeycloak

          @Deprecated
          public static OAuth2Auth createKeycloak(Vertx vertx,
                                                              OAuth2FlowType flow,
                                                              JsonObject config)

      Deprecated.
      Parameters:
        `vertx` - the Vertx instance
        `flow` -
        `config` - the config as exported from the admin console
      Returns:
        the auth provider

    - #### create

          @Deprecated
          public static OAuth2Auth create(Vertx vertx,
                                                      OAuth2FlowType flow,
                                                      OAuth2ClientOptions config)

      Deprecated.
      Create a OAuth2 auth provider
      Parameters:
        `vertx` - the Vertx instance
        `flow` -
        `config` - the config
      Returns:
        the auth provider

    - #### create

          @Deprecated
          public static OAuth2Auth create(Vertx vertx,
                                                      OAuth2FlowType flow)

      Deprecated.
      Create a OAuth2 auth provider
      Parameters:
        `vertx` - the Vertx instance
        `flow` -
      Returns:
        the auth provider

    - #### create

          public static OAuth2Auth create(Vertx vertx)

      Create a OAuth2 auth provider
      Parameters:
        `vertx` - the Vertx instance
      Returns:
        the auth provider

    - #### create

          public static OAuth2Auth create(Vertx vertx,
                                          OAuth2ClientOptions config)

      Create a OAuth2 auth provider
      Parameters:
        `vertx` - the Vertx instance
        `config` - the config
      Returns:
        the auth provider

    - #### authorizeURL

          public String authorizeURL(JsonObject params)

      Generate a redirect URL to the authN/Z backend. It only applies to auth_code flow.
      Parameters:
        `params` -
      Returns:

    - #### getToken

          @Deprecated
          public void getToken(JsonObject params,
                                           Handler<AsyncResult<AccessToken>> handler)

      Deprecated.
      Returns the Access Token object.
      Parameters:
        `params` - - JSON with the options, each flow requires different options.
        `handler` - - The handler returning the results.

    - #### rxGetToken

          @Deprecated
          public Single<AccessToken> rxGetToken(JsonObject params)

      Deprecated.
      Returns the Access Token object.
      Parameters:
        `params` - - JSON with the options, each flow requires different options.
      Returns:

    - #### decodeToken

          @Deprecated
          public OAuth2Auth decodeToken(String token,
                                                    Handler<AsyncResult<AccessToken>> handler)

      Deprecated.
      Decode a token to a `AccessToken` object. This is useful to handle bearer JWT tokens.
      Parameters:
        `token` - the access token (base64 string)
        `handler` - A handler to receive the event
      Returns:
        self

    - #### rxDecodeToken

          @Deprecated
          public Single<AccessToken> rxDecodeToken(String token)

      Deprecated.
      Decode a token to a `AccessToken` object. This is useful to handle bearer JWT tokens.
      Parameters:
        `token` - the access token (base64 string)
      Returns:
        self

    - #### introspectToken

          public OAuth2Auth introspectToken(String token,
                                            Handler<AsyncResult<AccessToken>> handler)

      Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
      Parameters:
        `token` - the access token (base64 string)
        `handler` - A handler to receive the event
      Returns:
        self

    - #### rxIntrospectToken

          public Single<AccessToken> rxIntrospectToken(String token)

      Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
      Parameters:
        `token` - the access token (base64 string)
      Returns:
        self

    - #### introspectToken

          public OAuth2Auth introspectToken(String token,
                                            String tokenType,
                                            Handler<AsyncResult<AccessToken>> handler)

      Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
      Parameters:
        `token` - the access token (base64 string)
        `tokenType` - hint to the token type e.g.: `access_token`
        `handler` - A handler to receive the event
      Returns:
        self

    - #### rxIntrospectToken

          public Single<AccessToken> rxIntrospectToken(String token,
                                                       String tokenType)

      Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
      Parameters:
        `token` - the access token (base64 string)
        `tokenType` - hint to the token type e.g.: `access_token`
      Returns:
        self

    - #### getScopeSeparator

          @Deprecated
          public String getScopeSeparator()

      Deprecated.
      Returns the scope separator. The RFC 6749 states that a scope is expressed as a set of case-sensitive and space-delimited strings, however vendors tend not to agree on this and we see the following cases being used: space, plus sign, comma.
      Returns:
        what value was used in the configuration of the object, falling back to the default value which is a space.

    - #### getFlowType

          public OAuth2FlowType getFlowType()

      Returns the configured flow type for the Oauth2 provider.
      Returns:
        the flow type.

    - #### loadJWK

          public OAuth2Auth loadJWK(Handler<AsyncResult<Void>> handler)

      Loads a JWK Set from the remote provider. When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
      Parameters:
        `handler` -
      Returns:

    - #### rxLoadJWK

          public Completable rxLoadJWK()

      Loads a JWK Set from the remote provider. When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
      Returns:

    - #### rbacHandler

          public OAuth2Auth rbacHandler(OAuth2RBAC rbac)

    - #### newInstance

          public static OAuth2Auth newInstance(OAuth2Auth arg)

Copyright © 2018 Eclipse. All rights reserved.