Package org.apache.cxf.sts.cache
Class HazelCastTokenStore
java.lang.Object
org.apache.cxf.sts.cache.HazelCastTokenStore
- All Implemented Interfaces:
TokenStore
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String identifier, SecurityToken token) Add the given token to the cache under the given identifiervoidadd(SecurityToken token) Add the given token to the cache.voiddestroy()com.hazelcast.core.HazelcastInstanceGet the Hazelcast instanceReturns theTokenof the given identifierReturn the list of all valid token identifiers.longgetTTL()Get the (default) TTL value in secondsvoidRemove an existing token by its identifiervoidsetHazelcastInstance(com.hazelcast.core.HazelcastInstance hazelcastInstance) Set the Hazelcast instance, otherwise default instance used If you configure Hazelcast instance in spring, you must inject the instance here.voidsetTTL(long newTtl) Set a new (default) TTL value in seconds
-
Field Details
-
DEFAULT_TTL
public static final long DEFAULT_TTL- See Also:
-
MAX_TTL
public static final long MAX_TTL- See Also:
-
-
Constructor Details
-
HazelCastTokenStore
-
-
Method Details
-
getHazelcastInstance
public com.hazelcast.core.HazelcastInstance getHazelcastInstance()Get the Hazelcast instance- Returns:
- Hazelcast instance
-
setHazelcastInstance
public void setHazelcastInstance(com.hazelcast.core.HazelcastInstance hazelcastInstance) Set the Hazelcast instance, otherwise default instance used If you configure Hazelcast instance in spring, you must inject the instance here.- Parameters:
hazelcastInstance- Hazelcast instance
-
setTTL
public void setTTL(long newTtl) Set a new (default) TTL value in seconds- Parameters:
newTtl- a new (default) TTL value in seconds
-
getTTL
public long getTTL()Get the (default) TTL value in seconds- Returns:
- the (default) TTL value in seconds
-
add
Description copied from interface:TokenStoreAdd the given token to the cache. The SecurityTokens getId() identifier will be used to key it in the cache.- Specified by:
addin interfaceTokenStore- Parameters:
token- The token to be added
-
add
Description copied from interface:TokenStoreAdd the given token to the cache under the given identifier- Specified by:
addin interfaceTokenStore- Parameters:
identifier- The identifier to use to key the SecurityToken in the cachetoken- The token to be added
-
remove
Description copied from interface:TokenStoreRemove an existing token by its identifier- Specified by:
removein interfaceTokenStore
-
getTokenIdentifiers
Description copied from interface:TokenStoreReturn the list of all valid token identifiers.- Specified by:
getTokenIdentifiersin interfaceTokenStore- Returns:
- As array of (valid) token identifiers
-
getToken
Description copied from interface:TokenStoreReturns theTokenof the given identifier- Specified by:
getTokenin interfaceTokenStore- Returns:
- The requested
Tokenidentified by the given identifier
-
destroy
public void destroy()
-