| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_SERVER_MANAGED |
| Modifier and Type | Method and Description |
|---|---|
void |
addMetadata(String tokenId,
TokenMetadata metadata)
Adds metadata to the token identified by the given ID
|
void |
addToken(JWTToken token,
long issueTime)
Add state for the specified token.
|
void |
addToken(String tokenId,
long issueTime,
long expiration)
Add state for the specified token.
|
void |
addToken(String tokenId,
long issueTime,
long expiration,
long maxLifetimeDuration)
Add state for the specified token.
|
long |
getDefaultMaxLifetimeDuration() |
long |
getDefaultRenewInterval() |
long |
getTokenExpiration(JWT token)
Get the token expiration.
|
long |
getTokenExpiration(String tokenId)
Get the token expiration.
|
long |
getTokenExpiration(String tokenId,
boolean validate)
Get the expiration for the specified token, optionally validating the token prior to accessing its expiration.
|
long |
getTokenIssueTime(String tokenId) |
TokenMetadata |
getTokenMetadata(String tokenId) |
Collection<KnoxToken> |
getTokens(String userName) |
boolean |
isExpired(JWTToken token)
Checks if the token is expired.
|
long |
renewToken(JWTToken token)
Extend the lifetime of the specified token by the default amount of time.
|
long |
renewToken(JWTToken token,
long renewInterval)
Extend the lifetime of the specified token by the specified amount of time.
|
long |
renewToken(String tokenId)
Extend the lifetime of the specified token by the default amount of time.
|
long |
renewToken(String tokenId,
long renewInterval)
Extend the lifetime of the specified token by the specified amount of time.
|
void |
revokeToken(JWTToken token)
Disable any subsequent use of the specified token.
|
void |
revokeToken(String tokenId)
Disable any subsequent use of the specified token.
|
static final String CONFIG_SERVER_MANAGED
long getDefaultRenewInterval()
long getDefaultMaxLifetimeDuration()
void addToken(JWTToken token, long issueTime)
token - The token.issueTime - The time the token was issued.void addToken(String tokenId, long issueTime, long expiration)
tokenId - The token unique identifier.issueTime - The time the token was issued.expiration - The token expiration time.void addToken(String tokenId, long issueTime, long expiration, long maxLifetimeDuration)
tokenId - The token unique identifier.issueTime - The time the token was issued.expiration - The token expiration time.maxLifetimeDuration - The maximum allowed lifetime for the token.long getTokenIssueTime(String tokenId) throws UnknownTokenException
tokenId - The token unique identifier.UnknownTokenException - if token is not found.boolean isExpired(JWTToken token) throws UnknownTokenException
token - The token.UnknownTokenException - Exception if token is not found.void revokeToken(JWTToken token) throws UnknownTokenException
token - The token.UnknownTokenException - Exception if token is not found.void revokeToken(String tokenId) throws UnknownTokenException
tokenId - The token unique identifier.UnknownTokenException - Exception if token is not found.long renewToken(JWTToken token) throws UnknownTokenException
token - The token.UnknownTokenException - Exception if token is not found.long renewToken(JWTToken token, long renewInterval) throws UnknownTokenException
token - The token.renewInterval - The amount of time that should be added to the token's lifetime.UnknownTokenException - Exception if token is not found.long renewToken(String tokenId) throws UnknownTokenException
tokenId - The token unique identifier.UnknownTokenException - Exception if token is not found.long renewToken(String tokenId, long renewInterval) throws UnknownTokenException
tokenId - The token unique identifier.renewInterval - The amount of time that should be added to the token's lifetime.UnknownTokenException - Exception if token is not found.long getTokenExpiration(JWT token) throws UnknownTokenException
token - The token.UnknownTokenException - Exception if token is not found.long getTokenExpiration(String tokenId) throws UnknownTokenException
tokenId - The token unique identifier.UnknownTokenException - Exception if token is not found.long getTokenExpiration(String tokenId, boolean validate) throws UnknownTokenException
tokenId - The token unique identifier.validate - Flag indicating whether the token needs to be validated.UnknownTokenException - Exception if token is not found.void addMetadata(String tokenId, TokenMetadata metadata)
tokenId - The token's unique identifier.metadata - The metadata to be addedTokenMetadata getTokenMetadata(String tokenId) throws UnknownTokenException
tokenId - The token's unique identifier.UnknownTokenExceptionCollection<KnoxToken> getTokens(String userName)
userName - The name of the user to get tokens forCopyright © 2022 The Apache Software Foundation. All rights reserved.