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)`
    `OAuth2Auth(Object 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()` Deprecated.
    `String` | `getScopeSeparator()` Deprecated.
    `void` | `getToken(JsonObject params, Handler<AsyncResult<AccessToken>> handler)` Deprecated.
    `int` | `hashCode()`
    `OAuth2Auth` | `introspectToken(String token, Handler<AsyncResult<AccessToken>> handler)` Deprecated.
    `OAuth2Auth` | `introspectToken(String token, String tokenType, Handler<AsyncResult<AccessToken>> handler)` Deprecated.
    `OAuth2Auth` | `loadJWK(Handler<AsyncResult<Void>> handler)` Deprecated.
    `OAuth2Auth` | `missingKeyHandler(Handler<String> handler)` Handled to be called when a key (mentioned on a JWT) is missing from the current config.
    `static OAuth2Auth` | `newInstance(OAuth2Auth arg)`
    `OAuth2Auth` | `rbacHandler(OAuth2RBAC rbac)` Deprecated.
    `Single<AccessToken>` | `rxDecodeToken(String token)` Deprecated.
    `Single<AccessToken>` | `rxGetToken(JsonObject params)` Deprecated.
    `Single<AccessToken>` | `rxIntrospectToken(String token)` Deprecated.
    `Single<AccessToken>` | `rxIntrospectToken(String token, String tokenType)` Deprecated.
    `Completable` | `rxLoadJWK()` Deprecated.
    `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)

    - #### OAuth2Auth

          public OAuth2Auth(Object 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

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

      Deprecated.
      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

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

      Deprecated.
      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

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

      Deprecated.
      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

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

      Deprecated.
      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

          @Deprecated
          public OAuth2FlowType getFlowType()

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

    - #### loadJWK

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

      Deprecated.
      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

          @Deprecated
          public Completable rxLoadJWK()

      Deprecated.
      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

          @Deprecated
          public OAuth2Auth rbacHandler(OAuth2RBAC rbac)

      Deprecated.

    - #### missingKeyHandler

          public OAuth2Auth missingKeyHandler(Handler<String> handler)

      Handled to be called when a key (mentioned on a JWT) is missing from the current config. Users are advised to call `loadJWK(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but being careful to implement some rate limiting function. This method isn't generic for several reasons. The provider is not aware of the capabilities of the backend IdP in terms of max allowed API calls. Some validation could be done at the key id, which only the end user is aware of.
      Parameters:
        `handler` -
      Returns:
        Future result.

    - #### newInstance

          public static OAuth2Auth newInstance(OAuth2Auth arg)

Copyright © 2020 Eclipse. All rights reserved.