Package org.apache.wss4j.common.cache
Interface ReplayCache
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
EHCacheReplayCache
,MemoryReplayCache
public interface ReplayCache extends Closeable
A cache to store (String) identifiers to avoid replay attacks. An example of such an identifier is a UsernameToken nonce.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(String identifier)
Add the given identifier to the cache.void
add(String identifier, Instant expiry)
Add the given identifier to the cache to be cached for the given timeboolean
contains(String identifier)
Return true if the given identifier is contained in the cache
-
-
-
Method Detail
-
add
void add(String identifier)
Add the given identifier to the cache. It will be cached for a default amount of time.- Parameters:
identifier
- The identifier to be added
-
add
void add(String identifier, Instant expiry)
Add the given identifier to the cache to be cached for the given time- Parameters:
identifier
- The identifier to be addedexpiry
- A custom expiry time for the identifier
-
contains
boolean contains(String identifier)
Return true if the given identifier is contained in the cache- Parameters:
identifier
- The identifier to check
-
-