Class EHCacheTokenStore
java.lang.Object
org.apache.cxf.ws.security.tokenstore.EHCacheTokenStore
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.cxf.buslifecycle.BusLifeCycleListener,TokenStore
public class EHCacheTokenStore
extends Object
implements TokenStore, Closeable, org.apache.cxf.buslifecycle.BusLifeCycleListener
An in-memory EHCache implementation of the TokenStore interface. The default TTL is 60 minutes
and the max TTL is 12 hours.
-
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.voidclose()Returns theTokenof the given identifierReturn the list of all valid token identifiers.voidvoidvoidvoidRemove an existing token by its identifier
-
Constructor Details
-
EHCacheTokenStore
public EHCacheTokenStore(String key, org.apache.cxf.Bus b, URL configFileURL) throws TokenStoreException - Throws:
TokenStoreException
-
-
Method Details
-
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
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
initComplete
public void initComplete()- Specified by:
initCompletein interfaceorg.apache.cxf.buslifecycle.BusLifeCycleListener
-
preShutdown
public void preShutdown()- Specified by:
preShutdownin interfaceorg.apache.cxf.buslifecycle.BusLifeCycleListener
-
postShutdown
public void postShutdown()- Specified by:
postShutdownin interfaceorg.apache.cxf.buslifecycle.BusLifeCycleListener
-