Class InfinispanTokenRevocationStoreProvider
- java.lang.Object
-
- org.keycloak.models.sessions.infinispan.InfinispanTokenRevocationStoreProvider
-
- All Implemented Interfaces:
TokenRevocationStoreProvider
,Provider
public class InfinispanTokenRevocationStoreProvider extends Object implements TokenRevocationStoreProvider
- Author:
- Marek Posolda
-
-
Field Summary
Fields Modifier and Type Field Description static org.jboss.logging.Logger
logger
-
Constructor Summary
Constructors Constructor Description InfinispanTokenRevocationStoreProvider(KeycloakSession session, Supplier<org.infinispan.commons.api.BasicCache<String,ActionTokenValueEntity>> tokenCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
isRevoked(String tokenId)
void
putRevokedToken(String tokenId, long lifespanSeconds)
Mark given token as revoked.
-
-
-
Constructor Detail
-
InfinispanTokenRevocationStoreProvider
public InfinispanTokenRevocationStoreProvider(KeycloakSession session, Supplier<org.infinispan.commons.api.BasicCache<String,ActionTokenValueEntity>> tokenCache)
-
-
Method Detail
-
putRevokedToken
public void putRevokedToken(String tokenId, long lifespanSeconds)
Description copied from interface:TokenRevocationStoreProvider
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 thatTokenRevocationStoreProvider.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.- Specified by:
putRevokedToken
in interfaceTokenRevocationStoreProvider
-
isRevoked
public boolean isRevoked(String tokenId)
- Specified by:
isRevoked
in interfaceTokenRevocationStoreProvider
- Returns:
- true if token exists in the store, which indicates that it is revoked.
-
-