Package: io.vertx.groovy.ext.auth.oauth2

## [Groovy] Class AccessToken

- io.vertx.groovy.ext.auth.oauth2.AccessToken

- AccessToken extension to the User interface

- - ### Constructor Summary

    Constructors
    Constructor and description
    `AccessToken (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `boolean` | `expired()` Check if the access token is expired or not.
    `java.lang.Object` | `getDelegate()`
    `AccessToken` | `logout(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> callback)` Revoke refresh token and calls the logout endpoint.
    `AccessToken` | `refresh(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> callback)` Refresh the access token
    `AccessToken` | `revoke(java.lang.String token_type, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> callback)` Revoke access or refresh token

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class User` | `clearCache, getDelegate, isAuthorised, principal, setAuthProvider`
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### AccessToken(java.lang.Object delegate)

  - ### Method Detail

    - #### boolean expired()

      Check if the access token is expired or not.

      Returns:

    - #### java.lang.Object getDelegate()

    - #### AccessToken logout(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> callback)

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

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

    - #### AccessToken refresh(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> callback)

      Refresh the access token

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

    - #### AccessToken revoke(java.lang.String token_type, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> callback)

      Revoke access or refresh token

      Returns:
      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.