Class EHCacheTokenReplayCache
java.lang.Object
org.apache.cxf.rs.security.saml.sso.EHCacheTokenReplayCache
- All Implemented Interfaces:
Closeable,AutoCloseable,TokenReplayCache<String>
An in-memory EHCache implementation of the TokenReplayCache interface.
The default TTL is 60 minutes and the max TTL is 12 hours.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEHCacheTokenReplayCache(String configFile) EHCacheTokenReplayCache(String configFile, org.apache.cxf.Bus bus) EHCacheTokenReplayCache(org.apache.cxf.Bus bus) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanReturn true if the given identifier is contained in the cachevoidAdd the given identifier to the cache.voidAdd the given identifier to the cache to be cached for the given time
-
Field Details
-
CACHE_KEY
- See Also:
-
-
Constructor Details
-
EHCacheTokenReplayCache
public EHCacheTokenReplayCache() throws IllegalAccessException, InstantiationException, ClassNotFoundException -
EHCacheTokenReplayCache
public EHCacheTokenReplayCache(org.apache.cxf.Bus bus) throws IllegalAccessException, InstantiationException, ClassNotFoundException -
EHCacheTokenReplayCache
public EHCacheTokenReplayCache(String configFile) throws IllegalAccessException, InstantiationException, ClassNotFoundException -
EHCacheTokenReplayCache
public EHCacheTokenReplayCache(String configFile, org.apache.cxf.Bus bus) throws IllegalAccessException, ClassNotFoundException, InstantiationException
-
-
Method Details
-
putId
Add the given identifier to the cache. It will be cached for a default amount of time.- Specified by:
putIdin interfaceTokenReplayCache<String>- Parameters:
identifier- The identifier to be added
-
putId
Add the given identifier to the cache to be cached for the given time- Specified by:
putIdin interfaceTokenReplayCache<String>- Parameters:
identifier- The identifier to be addedexpiry- A custom expiry time for the identifier. Can be null in which case, the default expiry is used.
-
contains
Return true if the given identifier is contained in the cache- Specified by:
containsin interfaceTokenReplayCache<String>- Parameters:
identifier- The identifier to check
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceTokenReplayCache<String>
-