Interface TokenStore
- All Known Implementing Classes:
EHCacheTokenStore,MemoryTokenStore
public interface TokenStore
This interface defines a caching mechanism for security tokens. It is up to the underlying implementation
to handle token expiration (e.g. by querying the SecurityToken's expires date).
-
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.Returns theTokenof the given identifierReturn the list of all valid token identifiers.voidRemove an existing token by its identifier
-
Method Details
-
add
Add the given token to the cache. The SecurityTokens getId() identifier will be used to key it in the cache.- Parameters:
token- The token to be added
-
add
Add the given token to the cache under the given identifier- Parameters:
identifier- The identifier to use to key the SecurityToken in the cachetoken- The token to be added
-
remove
Remove an existing token by its identifier -
getTokenIdentifiers
Collection<String> getTokenIdentifiers()Return the list of all valid token identifiers.- Returns:
- As array of (valid) token identifiers
-
getToken
Returns theTokenof the given identifier- Parameters:
identifier-- Returns:
- The requested
Tokenidentified by the given identifier
-