Package org.apache.rahas
Interface TokenStorage
- All Known Implementing Classes:
SimpleTokenStore
public interface TokenStorage
The storage interface to store security tokens and
manipulate them
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given token to the list.Token[]
Return the list of CANCELLED tokensToken[]
Return the list ofEXPIRED
tokens.Token[]
Return the list of RENEWED tokens.Returns theToken
of the given idString[]
Return the list of all token identifiers.Token[]
Return the list of ISSUED and RENEWED tokens.void
removeToken
(String id) Removes the given token from token storage.void
Update an existing token.
-
Field Details
-
TOKEN_STORAGE_KEY
- See Also:
-
-
Method Details
-
add
Add the given token to the list.- Parameters:
token
- The token to be added- Throws:
TrustException
-
update
Update an existing token.- Parameters:
token
-- Throws:
TrustException
-
getTokenIdentifiers
Return the list of all token identifiers.- Returns:
- As array of token identifiers
- Throws:
TrustException
-
getExpiredTokens
Return the list ofEXPIRED
tokens. If there are noEXPIRED
tokensnull
will be returned- Returns:
- An array of expired
Tokens
- Throws:
TrustException
-
getValidTokens
Return the list of ISSUED and RENEWED tokens.- Returns:
- An array of ISSUED and RENEWED
Tokens
. - Throws:
TrustException
-
getRenewedTokens
Return the list of RENEWED tokens.- Returns:
- An array of RENEWED
Tokens
- Throws:
TrustException
-
getCancelledTokens
Return the list of CANCELLED tokens- Returns:
- An array of CANCELLED
Tokens
- Throws:
TrustException
-
getToken
Returns theToken
of the given id- Parameters:
id
-- Returns:
- The requested
Token
identified by the give id - Throws:
TrustException
-
removeToken
Removes the given token from token storage.- Parameters:
id
- Token id to remove.
-