Apache CXF API

org.apache.cxf.ws.security.tokenstore
Interface TokenStore

All Known Implementing Classes:
DefaultInMemoryTokenStore, EHCacheTokenStore, HazelCastTokenStore, 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
 void add(SecurityToken token)
          Add the given token to the cache.
 void add(String identifier, SecurityToken token)
          Add the given token to the cache under the given identifier
 SecurityToken getToken(String identifier)
          Returns the Token of the given identifier
 Collection<String> getTokenIdentifiers()
          Return the list of all valid token identifiers.
 void remove(String identifier)
          Remove an existing token by its identifier
 

Method Detail

add

void add(SecurityToken token)
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

void add(String identifier,
         SecurityToken token)
Add the given token to the cache under the given identifier

Parameters:
identifier - The identifier to use to key the SecurityToken in the cache
token - The token to be added

remove

void remove(String identifier)
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

SecurityToken getToken(String identifier)
Returns the Token of the given identifier

Parameters:
identifier -
Returns:
The requested Token identified by the given identifier

Apache CXF API

Apache CXF