io.vertx.ext.auth.oauth2

## Interface AccessToken

- All Superinterfaces:
    User

      public interface AccessToken
      extends User

  AccessToken extension to the User interface
  Author:
    Paulo Lopes

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `expired()` Check if the access token is expired or not.
    `AccessToken` | `introspect(Handler<AsyncResult<Void>> callback)` Introspect access token.
    `AccessToken` | `logout(Handler<AsyncResult<Void>> callback)` Revoke refresh token and calls the logout endpoint.
    `AccessToken` | `refresh(Handler<AsyncResult<Void>> callback)` Refresh the access token
    `AccessToken` | `revoke(String token_type, Handler<AsyncResult<Void>> callback)` Revoke access or refresh token

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

      `clearCache, isAuthorised, principal, setAuthProvider`

- - ### Method Detail

    - #### expired

          boolean expired()

      Check if the access token is expired or not.

    - #### refresh

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

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

    - #### revoke

          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.

    - #### logout

          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.

    - #### introspect

          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.

Copyright © 2017. All rights reserved.