Package 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 likeCodeToTokenStoreProvider
,SingleUseTokenStoreProvider
andActionTokenStoreProvider
- Author:
- Marek Posolda
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isRevoked(String tokenId)
void
putRevokedToken(String tokenId, long lifespanSeconds)
Mark given token as revoked.
-
-
-
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 thatisRevoked(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.
-
-