Package org.forgerock.tokenhandler
Interface TokenHandler
- All Known Implementing Classes:
 JwtTokenHandler,SecretsJwtTokenHandler
public interface TokenHandler
Responsible for the validation, generation and parsing of tokens used for keying a JsonValue
 representative of some state.  Implementers must catch implementation-specific exceptions
 and re-throw as 
TokenHandlerException.- 
Method Summary
 
- 
Method Details
- 
generate
Generates a new token using the state.- Parameters:
 state- the state- Returns:
 - token
 - Throws:
 TokenHandlerException- on failure to generate token
 - 
validate
Validates the passed token.- Parameters:
 token- the token to be validated- Throws:
 InvalidTokenException- on invalid tokenExpiredTokenException- on expired tokenTokenHandlerException- on other failure to validate token
 - 
validateAndExtractState
Validates and parses the token, extracting any encapsulated state.- Parameters:
 token- the token to be validated and parsed- Returns:
 - the state
 - Throws:
 InvalidTokenException- on invalid tokenExpiredTokenException- on expired tokenTokenHandlerException- on other failure to validate or extract token
 
 -