io.vertx.rxjava.ext.auth.oauth2

## Class OAuth2Auth

- java.lang.Object
- - io.vertx.rxjava.ext.auth.AuthProvider
  - - io.vertx.rxjava.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 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
    --- | ---
    `OAuth2Auth` | `api(HttpMethod method, String path, JsonObject params, Handler<AsyncResult<JsonObject>> handler)` Call OAuth2 APIs.
    `rx.Observable<JsonObject>` | `apiObservable(HttpMethod method, String path, JsonObject params)` Deprecated. use `rxApi(io.vertx.core.http.HttpMethod, java.lang.String, io.vertx.core.json.JsonObject)` instead
    `String` | `authorizeURL(JsonObject params)` Generate a redirect URL to the authN/Z backend.
    `static OAuth2Auth` | `create(Vertx vertx, OAuth2FlowType flow)` Create a OAuth2 auth provider
    `static OAuth2Auth` | `create(Vertx vertx, OAuth2FlowType flow, OAuth2ClientOptions config)` Create a OAuth2 auth provider
    `static OAuth2Auth` | `createKeycloak(Vertx vertx, OAuth2FlowType flow, JsonObject config)`
    `OAuth2Auth` | `decodeToken(String token, Handler<AsyncResult<AccessToken>> handler)` Decode a token to a `AccessToken` object.
    `rx.Observable<AccessToken>` | `decodeTokenObservable(String token)` Deprecated. use `rxDecodeToken(java.lang.String)` instead
    `OAuth2Auth` | `getDelegate()`
    `OAuth2FlowType` | `getFlowType()` Returns the configured flow type for the Oauth2 provider.
    `String` | `getScopeSeparator()` Returns the scope separator.
    `void` | `getToken(JsonObject params, Handler<AsyncResult<AccessToken>> handler)` Returns the Access Token object.
    `rx.Observable<AccessToken>` | `getTokenObservable(JsonObject params)` Deprecated. use `rxGetToken(io.vertx.core.json.JsonObject)` instead
    `boolean` | `hasJWTToken()` Returns true if this provider supports JWT tokens as the access_token.
    `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<JsonObject>> 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.
    `rx.Observable<AccessToken>` | `introspectTokenObservable(String token)` Deprecated. use `rxIntrospectToken(java.lang.String)` instead
    `rx.Observable<JsonObject>` | `introspectTokenObservable(String token, String tokenType)` Deprecated. use `rxIntrospectToken(java.lang.String)` instead
    `static OAuth2Auth` | `newInstance(OAuth2Auth arg)`
    `rx.Single<JsonObject>` | `rxApi(HttpMethod method, String path, JsonObject params)` Call OAuth2 APIs.
    `rx.Single<AccessToken>` | `rxDecodeToken(String token)` Decode a token to a `AccessToken` object.
    `rx.Single<AccessToken>` | `rxGetToken(JsonObject params)` Returns the Access Token object.
    `rx.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.
    `rx.Single<JsonObject>` | `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.

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

      `authenticate, authenticateObservable, newInstance, rxAuthenticate`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final TypeArg<OAuth2Auth> __TYPE_ARG

  - ### Constructor Detail

    - #### OAuth2Auth

          public OAuth2Auth(OAuth2Auth delegate)

  - ### Method Detail

    - #### getDelegate

          public OAuth2Auth getDelegate()

      Overrides:
        `getDelegate` in class `AuthProvider`

    - #### createKeycloak

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

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

    - #### create

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

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

    - #### create

          public static OAuth2Auth create(Vertx vertx,
                                          OAuth2FlowType flow)

      Create a OAuth2 auth provider
      Parameters:
        `vertx` - the Vertx instance
        `flow` -
      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

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

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

    - #### getTokenObservable

          @Deprecated
          public rx.Observable<AccessToken> getTokenObservable(JsonObject params)

      Deprecated. use `rxGetToken(io.vertx.core.json.JsonObject)` instead
      Returns the Access Token object.
      Parameters:
        `params` - - JSON with the options, each flow requires different options.
      Returns:

    - #### rxGetToken

          public rx.Single<AccessToken> rxGetToken(JsonObject params)

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

    - #### api

          public OAuth2Auth api(HttpMethod method,
                                String path,
                                JsonObject params,
                                Handler<AsyncResult<JsonObject>> handler)

      Call OAuth2 APIs.
      Parameters:
        `method` - HttpMethod
        `path` - target path
        `params` - parameters
        `handler` - handler
      Returns:
        self

    - #### apiObservable

          @Deprecated
          public rx.Observable<JsonObject> apiObservable(HttpMethod method,
                                                                     String path,
                                                                     JsonObject params)

      Deprecated. use `rxApi(io.vertx.core.http.HttpMethod, java.lang.String, io.vertx.core.json.JsonObject)` instead
      Call OAuth2 APIs.
      Parameters:
        `method` - HttpMethod
        `path` - target path
        `params` - parameters
      Returns:

    - #### rxApi

          public rx.Single<JsonObject> rxApi(HttpMethod method,
                                             String path,
                                             JsonObject params)

      Call OAuth2 APIs.
      Parameters:
        `method` - HttpMethod
        `path` - target path
        `params` - parameters
      Returns:

    - #### hasJWTToken

          public boolean hasJWTToken()

      Returns true if this provider supports JWT tokens as the access_token. This is typically true if the provider implements the `openid-connect` protocol. This is a plain return from the config option jwtToken, which is false by default. This information is important to validate grants. Since pure OAuth2 should be used for authorization and when a token is requested all grants should be declared, in case of openid-connect this is not true. OpenId will issue a token and all grants will be encoded on the token itself so the requester does not need to list the required grants.
      Returns:
        true if openid-connect is used.

    - #### decodeToken

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

      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

    - #### decodeTokenObservable

          @Deprecated
          public rx.Observable<AccessToken> decodeTokenObservable(String token)

      Deprecated. use `rxDecodeToken(java.lang.String)` instead
      Decode a token to a `AccessToken` object. This is useful to handle bearer JWT tokens.
      Parameters:
        `token` - the access token (base64 string)
      Returns:

    - #### rxDecodeToken

          public rx.Single<AccessToken> rxDecodeToken(String token)

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

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

    - #### introspectTokenObservable

          @Deprecated
          public rx.Observable<AccessToken> introspectTokenObservable(String token)

      Deprecated. use `rxIntrospectToken(java.lang.String)` instead
      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:

    - #### rxIntrospectToken

          public rx.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:

    - #### introspectToken

          public OAuth2Auth introspectToken(String token,
                                            String tokenType,
                                            Handler<AsyncResult<JsonObject>> 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

    - #### introspectTokenObservable

          @Deprecated
          public rx.Observable<JsonObject> introspectTokenObservable(String token,
                                                                                 String tokenType)

      Deprecated. use `rxIntrospectToken(java.lang.String)` instead
      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:

    - #### rxIntrospectToken

          public rx.Single<JsonObject> 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:

    - #### getScopeSeparator

          public String getScopeSeparator()

      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.

    - #### newInstance

          public static OAuth2Auth newInstance(OAuth2Auth arg)

Copyright © 2017. All rights reserved.