io.vertx.ext.auth.oauth2

## Interface OAuth2Auth

- All Superinterfaces:
    AuthProvider

      public interface OAuth2Auth
      extends AuthProvider

  Factory interface for creating OAuth2 based `AuthProvider` instances.
  Author:
    Paulo Lopes

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default 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. the flow configuration should be passed in the config object
    `static OAuth2Auth` | `create(Vertx vertx, OAuth2FlowType flow, OAuth2ClientOptions config)` Deprecated. the flow configuration should be passed in the config object
    `static OAuth2Auth` | `createKeycloak(Vertx vertx, OAuth2FlowType flow, JsonObject config)` Deprecated. You should use the provider helper `KeycloakAuth` instead. Create a OAuth2 auth provider
    `OAuth2Auth` | `decodeToken(String token, Handler<AsyncResult<AccessToken>> handler)` Deprecated. use `AuthProvider.authenticate(JsonObject, Handler)` instead.
    `OAuth2FlowType` | `getFlowType()` Returns the configured flow type for the Oauth2 provider.
    `String` | `getScopeSeparator()` Deprecated.
    `void` | `getToken(JsonObject params, Handler<AsyncResult<AccessToken>> handler)` Deprecated. use `AuthProvider.authenticate(JsonObject, Handler)` instead.
    `default 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.
    `OAuth2Auth` | `rbacHandler(OAuth2RBAC rbac)`

    - ### Methods inherited from interface io.vertx.ext.auth.AuthProvider

      `authenticate`

- - ### Method Detail

    - #### createKeycloak

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

      Deprecated. You should use the provider helper `KeycloakAuth` instead. Create a OAuth2 auth provider
      Parameters:
        `vertx` - the Vertx instance
        `config` - the config as exported from the admin console
      Returns:
        the auth provider

    - #### create

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

      Deprecated. the flow configuration should be passed in the config object
      Create a OAuth2 auth provider
      Parameters:
        `vertx` - the Vertx instance
        `config` - the config
      Returns:
        the auth provider

    - #### create

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

      Deprecated. the flow configuration should be passed in the config object
      Create a OAuth2 auth provider
      Parameters:
        `vertx` - the Vertx instance
      Returns:
        the auth provider

    - #### create

          static OAuth2Auth create(Vertx vertx)

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

    - #### create

          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

          String authorizeURL(JsonObject params)

      Generate a redirect URL to the authN/Z backend. It only applies to auth_code flow.

    - #### getToken

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

      Deprecated. use `AuthProvider.authenticate(JsonObject, Handler)` instead.
      Returns the Access Token object.
      Parameters:
        `params` - - JSON with the options, each flow requires different options.
        `handler` - - The handler returning the results.

    - #### decodeToken

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

      Deprecated. use `AuthProvider.authenticate(JsonObject, Handler)` instead.
      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

    - #### introspectToken

          default 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

    - #### introspectToken

          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

    - #### getScopeSeparator

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

          OAuth2FlowType getFlowType()

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

    - #### loadJWK

          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.

    - #### rbacHandler

          OAuth2Auth rbacHandler(OAuth2RBAC rbac)

Copyright © 2019 Eclipse. All rights reserved.