Class InfinispanActionTokenStoreProvider
- java.lang.Object
-
- org.keycloak.models.sessions.infinispan.InfinispanActionTokenStoreProvider
-
- All Implemented Interfaces:
ActionTokenStoreProvider
,Provider
public class InfinispanActionTokenStoreProvider extends Object implements ActionTokenStoreProvider
- Author:
- hmlnarik
-
-
Constructor Summary
Constructors Constructor Description InfinispanActionTokenStoreProvider(KeycloakSession session, org.infinispan.Cache<ActionTokenReducedKey,ActionTokenValueEntity> actionKeyCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ActionTokenValueModel
get(ActionTokenKeyModel actionTokenKey)
Returns token corresponding to the given key from the internal action token storevoid
put(ActionTokenKeyModel key, Map<String,String> notes)
Adds a given token to token store.ActionTokenValueModel
remove(ActionTokenKeyModel actionTokenKey)
Removes token corresponding to the given key from the internal action token store, and returns the stored value
-
-
-
Constructor Detail
-
InfinispanActionTokenStoreProvider
public InfinispanActionTokenStoreProvider(KeycloakSession session, org.infinispan.Cache<ActionTokenReducedKey,ActionTokenValueEntity> actionKeyCache)
-
-
Method Detail
-
put
public void put(ActionTokenKeyModel key, Map<String,String> notes)
Description copied from interface:ActionTokenStoreProvider
Adds a given token to token store.- Specified by:
put
in interfaceActionTokenStoreProvider
- Parameters:
key
- keynotes
- Optional notes to be stored with the token. Can benull
in which case it is treated as an empty map.
-
get
public ActionTokenValueModel get(ActionTokenKeyModel actionTokenKey)
Description copied from interface:ActionTokenStoreProvider
Returns token corresponding to the given key from the internal action token store- Specified by:
get
in interfaceActionTokenStoreProvider
- Parameters:
actionTokenKey
- key- Returns:
null
if no token is found for given key and nonce, value otherwise
-
remove
public ActionTokenValueModel remove(ActionTokenKeyModel actionTokenKey)
Description copied from interface:ActionTokenStoreProvider
Removes token corresponding to the given key from the internal action token store, and returns the stored value- Specified by:
remove
in interfaceActionTokenStoreProvider
- Parameters:
actionTokenKey
- key- Returns:
null
if no token is found for given key and nonce, value otherwise
-
-