io.vertx.reactivex.ext.auth.oauth2

## Class AccessToken

- java.lang.Object
- - io.vertx.reactivex.ext.auth.User
  - - io.vertx.reactivex.ext.auth.oauth2.AccessToken

-     public class AccessToken
      extends User

  AccessToken extension to the User interface

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AccessToken(AccessToken delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `JsonObject` | `accessToken()` The Access Token if present parsed as a JsonObject
    `boolean` | `equals(Object o)`
    `boolean` | `expired()` Check if the access token is expired or not.
    `AccessToken` | `fetch(HttpMethod method, String resource, JsonObject headers, Buffer payload, Handler<AsyncResult<OAuth2Response>> callback)` Fetches a JSON resource using this Access Token.
    `AccessToken` | `fetch(String resource, Handler<AsyncResult<OAuth2Response>> callback)` Fetches a JSON resource using this Access Token.
    `AccessToken` | `getDelegate()`
    `int` | `hashCode()`
    `JsonObject` | `idToken()` The Id Token if present parsed as a JsonObject
    `AccessToken` | `introspect(Handler<AsyncResult<Void>> callback)` Introspect access token.
    `AccessToken` | `introspect(String tokenType, Handler<AsyncResult<Void>> callback)` Introspect access token.
    `AccessToken` | `logout(Handler<AsyncResult<Void>> callback)` Revoke refresh token and calls the logout endpoint.
    `static AccessToken` | `newInstance(AccessToken arg)`
    `String` | `opaqueAccessToken()` The RAW String if available for the Access Token
    `String` | `opaqueIdToken()` The RAW String if available for the Id Token
    `String` | `opaqueRefreshToken()` The RAW String if available for the Refresh Token
    `AccessToken` | `refresh(Handler<AsyncResult<Void>> callback)` Refresh the access token
    `JsonObject` | `refreshToken()` Deprecated.
    `AccessToken` | `revoke(String token_type, Handler<AsyncResult<Void>> callback)` Revoke access or refresh token
    `Single<OAuth2Response>` | `rxFetch(HttpMethod method, String resource, JsonObject headers, Buffer payload)` Fetches a JSON resource using this Access Token.
    `Single<OAuth2Response>` | `rxFetch(String resource)` Fetches a JSON resource using this Access Token.
    `Completable` | `rxIntrospect()` Introspect access token.
    `Completable` | `rxIntrospect(String tokenType)` Introspect access token.
    `Completable` | `rxLogout()` Revoke refresh token and calls the logout endpoint.
    `Completable` | `rxRefresh()` Refresh the access token
    `Completable` | `rxRevoke(String token_type)` Revoke access or refresh token
    `Single<JsonObject>` | `rxUserInfo()` Load the user info as per OIDC spec.
    `AccessToken` | `setTrustJWT(boolean trust)`
    `String` | `tokenType()`
    `String` | `toString()`
    `AccessToken` | `userInfo(Handler<AsyncResult<JsonObject>> callback)` Load the user info as per OIDC spec.

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

      `clearCache, isAuthorised, isAuthorized, newInstance, principal, rxIsAuthorised, rxIsAuthorized, setAuthProvider`

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

  - ### Constructor Detail

    - #### AccessToken

          public AccessToken(AccessToken delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `User`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `User`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `User`

    - #### getDelegate

          public AccessToken getDelegate()

      Overrides:
        `getDelegate` in class `User`

    - #### expired

          public boolean expired()

      Check if the access token is expired or not.
      Returns:

    - #### accessToken

          public JsonObject accessToken()

      The Access Token if present parsed as a JsonObject
      Returns:
        JSON

    - #### refreshToken

          @Deprecated
          public JsonObject refreshToken()

      Deprecated.
      The Refresh Token if present parsed as a JsonObject
      Returns:
        JSON

    - #### idToken

          public JsonObject idToken()

      The Id Token if present parsed as a JsonObject
      Returns:
        JSON

    - #### opaqueAccessToken

          public String opaqueAccessToken()

      The RAW String if available for the Access Token
      Returns:
        String

    - #### opaqueRefreshToken

          public String opaqueRefreshToken()

      The RAW String if available for the Refresh Token
      Returns:
        String

    - #### opaqueIdToken

          public String opaqueIdToken()

      The RAW String if available for the Id Token
      Returns:
        String

    - #### tokenType

          public String tokenType()

    - #### setTrustJWT

          public AccessToken setTrustJWT(boolean trust)

    - #### refresh

          public AccessToken refresh(Handler<AsyncResult<Void>> callback)

      Refresh the access token
      Parameters:
        `callback` - - The callback function returning the results.
      Returns:

    - #### rxRefresh

          public Completable rxRefresh()

      Refresh the access token
      Returns:

    - #### revoke

          public AccessToken revoke(String token_type,
                                    Handler<AsyncResult<Void>> callback)

      Revoke access or refresh token
      Parameters:
        `token_type` - - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".
        `callback` - - The callback function returning the results.
      Returns:

    - #### rxRevoke

          public Completable rxRevoke(String token_type)

      Revoke access or refresh token
      Parameters:
        `token_type` - - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".
      Returns:

    - #### logout

          public AccessToken logout(Handler<AsyncResult<Void>> callback)

      Revoke refresh token and calls the logout endpoint. This is a openid-connect extension and might not be available on all providers.
      Parameters:
        `callback` - - The callback function returning the results.
      Returns:

    - #### rxLogout

          public Completable rxLogout()

      Revoke refresh token and calls the logout endpoint. This is a openid-connect extension and might not be available on all providers.
      Returns:

    - #### introspect

          public AccessToken introspect(Handler<AsyncResult<Void>> callback)

      Introspect access token. This is an OAuth2 extension that allow to verify if an access token is still valid.
      Parameters:
        `callback` - - The callback function returning the results.
      Returns:

    - #### rxIntrospect

          public Completable rxIntrospect()

      Introspect access token. This is an OAuth2 extension that allow to verify if an access token is still valid.
      Returns:

    - #### introspect

          public AccessToken introspect(String tokenType,
                                        Handler<AsyncResult<Void>> callback)

      Introspect access token. This is an OAuth2 extension that allow to verify if an access token is still valid.
      Parameters:
        `tokenType` - - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".
        `callback` - - The callback function returning the results.
      Returns:

    - #### rxIntrospect

          public Completable rxIntrospect(String tokenType)

      Introspect access token. This is an OAuth2 extension that allow to verify if an access token is still valid.
      Parameters:
        `tokenType` - - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".
      Returns:

    - #### userInfo

          public AccessToken userInfo(Handler<AsyncResult<JsonObject>> callback)

      Load the user info as per OIDC spec.
      Parameters:
        `callback` - - The callback function returning the results.
      Returns:

    - #### rxUserInfo

          public Single<JsonObject> rxUserInfo()

      Load the user info as per OIDC spec.
      Returns:

    - #### fetch

          public AccessToken fetch(String resource,
                                   Handler<AsyncResult<OAuth2Response>> callback)

      Fetches a JSON resource using this Access Token.
      Parameters:
        `resource` - - the resource to fetch.
        `callback` - - The callback function returning the results.
      Returns:

    - #### rxFetch

          public Single<OAuth2Response> rxFetch(String resource)

      Fetches a JSON resource using this Access Token.
      Parameters:
        `resource` - - the resource to fetch.
      Returns:

    - #### fetch

          public AccessToken fetch(HttpMethod method,
                                   String resource,
                                   JsonObject headers,
                                   Buffer payload,
                                   Handler<AsyncResult<OAuth2Response>> callback)

      Fetches a JSON resource using this Access Token.
      Parameters:
        `method` - - the HTTP method to user.
        `resource` - - the resource to fetch.
        `headers` - - extra headers to pass to the request.
        `payload` - - payload to send to the server.
        `callback` - - The callback function returning the results.
      Returns:

    - #### rxFetch

          public Single<OAuth2Response> rxFetch(HttpMethod method,
                                                String resource,
                                                JsonObject headers,
                                                Buffer payload)

      Fetches a JSON resource using this Access Token.
      Parameters:
        `method` - - the HTTP method to user.
        `resource` - - the resource to fetch.
        `headers` - - extra headers to pass to the request.
        `payload` - - payload to send to the server.
      Returns:

    - #### newInstance

          public static AccessToken newInstance(AccessToken arg)

Copyright © 2019 Eclipse. All rights reserved.