org.keycloak.admin.client.token

## Class TokenManager

- java.lang.Object
- - org.keycloak.admin.client.token.TokenManager

-     public class TokenManager
      extends Object

  Author:
    rodrigo.sasaki@icarros.com.br

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenManager(Config config, javax.ws.rs.client.Client client)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AccessTokenResponse` | `getAccessToken()`
    `String` | `getAccessTokenString()`
    `AccessTokenResponse` | `grantToken()`
    `void` | `invalidate(String token)` Invalidates the current token, but only when it is equal to the token passed as an argument.
    `AccessTokenResponse` | `refreshToken()`
    `void` | `setMinTokenValidity(long minTokenValidity)`

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

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

- - ### Constructor Detail

    - #### TokenManager

          public TokenManager(Config config,
                              javax.ws.rs.client.Client client)

  - ### Method Detail

    - #### getAccessTokenString

          public String getAccessTokenString()

    - #### getAccessToken

          public AccessTokenResponse getAccessToken()

    - #### grantToken

          public AccessTokenResponse grantToken()

    - #### refreshToken

          public AccessTokenResponse refreshToken()

    - #### setMinTokenValidity

          public void setMinTokenValidity(long minTokenValidity)

    - #### invalidate

          public void invalidate(String token)

      Invalidates the current token, but only when it is equal to the token passed as an argument.
      Parameters:
        `token` - the token to invalidate (cannot be null).

Copyright © 2020 JBoss by Red Hat. All rights reserved.