Class InfinispanSingleUseTokenStoreProvider
- java.lang.Object
-
- org.keycloak.models.sessions.infinispan.InfinispanSingleUseTokenStoreProvider
-
- All Implemented Interfaces:
SingleUseTokenStoreProvider,Provider
public class InfinispanSingleUseTokenStoreProvider extends Object implements SingleUseTokenStoreProvider
TODO: Check if Boolean can be used as single-use cache argument instead of ActionTokenValueEntity. With respect to other single-use cache usecases like "Revoke Refresh Token" . Also with respect to the usage of streams iterating over "actionTokens" cache (check there are no ClassCastExceptions when casting values directly to ActionTokenValueEntity)- Author:
- Marek Posolda
-
-
Field Summary
Fields Modifier and Type Field Description static org.jboss.logging.Loggerlogger
-
Constructor Summary
Constructors Constructor Description InfinispanSingleUseTokenStoreProvider(KeycloakSession session, Supplier<org.infinispan.commons.api.BasicCache<String,ActionTokenValueEntity>> actionKeyCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanputIfAbsent(String tokenId, int lifespanInSeconds)
-
-
-
Constructor Detail
-
InfinispanSingleUseTokenStoreProvider
public InfinispanSingleUseTokenStoreProvider(KeycloakSession session, Supplier<org.infinispan.commons.api.BasicCache<String,ActionTokenValueEntity>> actionKeyCache)
-
-
Method Detail
-
putIfAbsent
public boolean putIfAbsent(String tokenId, int lifespanInSeconds)
- Specified by:
putIfAbsentin interfaceSingleUseTokenStoreProvider
-
-