org.keycloak.models

## Interface TokenRevocationStoreProvider

- All Superinterfaces:
    Provider
  All Known Implementing Classes:
    InfinispanTokenRevocationStoreProvider

      public interface TokenRevocationStoreProvider
      extends Provider

  Provides the cache for store revoked tokens. For now, it is separate provider as it is bit different use-case that existing providers like `CodeToTokenStoreProvider`, `SingleUseTokenStoreProvider` and `ActionTokenStoreProvider`
  Author:
    Marek Posolda

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isRevoked(String tokenId)`
    `void` | `putRevokedToken(String tokenId, long lifespanSeconds)` Mark given token as revoked.

    - ### Methods inherited from interface org.keycloak.provider.Provider

      `close`

- - ### Method Detail

    - #### putRevokedToken

          void putRevokedToken(String tokenId,
                               long lifespanSeconds)

      Mark given token as revoked. Parameter "lifespanSeconds" is the time for which the token is considered revoked. After this time, it may be removed from this store, which means that `isRevoked(java.lang.String)` method will return false. In reality, the token will usually still be invalid due the "expiration" claim on it, however that is out of scope of this provider.
      Parameters:
        `tokenId` -

    - #### isRevoked

          boolean isRevoked(String tokenId)

      Parameters:
        `tokenId` -
      Returns:
        true if token exists in the store, which indicates that it is revoked.

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