Class JwtTokenHandler
java.lang.Object
org.forgerock.json.jose.tokenhandler.JwtTokenHandler
- All Implemented Interfaces:
TokenHandler
Deprecated.
Token handler for creating tokens using a JWT as the store.
-
Constructor Summary
ConstructorDescriptionJwtTokenHandler
(JweAlgorithm jweAlgorithm, EncryptionMethod jweMethod, KeyPair jweKeyPair, JwsAlgorithm jwsAlgorithm, SigningHandler jwsHandler) Deprecated.Constructs a new JWT token handler that never expires.JwtTokenHandler
(JweAlgorithm jweAlgorithm, EncryptionMethod jweMethod, KeyPair jweKeyPair, JwsAlgorithm jwsAlgorithm, SigningHandler jwsHandler, Optional<Long> tokenLifeTimeInSeconds, int tokenStatePaddingLength) Deprecated.Constructs a new JWT token handler. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Generates a new token using the state.void
Deprecated.Validates the passed token.validateAndExtractState
(String snapshotToken) Deprecated.Validates and parses the token, extracting any encapsulated state.
-
Constructor Details
-
JwtTokenHandler
public JwtTokenHandler(JweAlgorithm jweAlgorithm, EncryptionMethod jweMethod, KeyPair jweKeyPair, JwsAlgorithm jwsAlgorithm, SigningHandler jwsHandler) Deprecated.Constructs a new JWT token handler that never expires.- Parameters:
jweAlgorithm
- the JWE algorithm use to construct the key pairjweMethod
- the encryption method to usejweKeyPair
- key pair for the purpose of encryptionjwsAlgorithm
- the JWS algorithm to usejwsHandler
- the signing handler
-
JwtTokenHandler
public JwtTokenHandler(JweAlgorithm jweAlgorithm, EncryptionMethod jweMethod, KeyPair jweKeyPair, JwsAlgorithm jwsAlgorithm, SigningHandler jwsHandler, Optional<Long> tokenLifeTimeInSeconds, int tokenStatePaddingLength) Deprecated.Constructs a new JWT token handler.- Parameters:
jweAlgorithm
- the JWE algorithm use to construct the key pairjweMethod
- the encryption method to usejweKeyPair
- key pair for the purpose of encryptionjwsAlgorithm
- the JWS algorithm to usejwsHandler
- the signing handlertokenLifeTimeInSeconds
- token life time in secondstokenStatePaddingLength
- desired length of state claim after padding
-
-
Method Details
-
generate
Deprecated.Description copied from interface:TokenHandler
Generates a new token using the state.- Specified by:
generate
in interfaceTokenHandler
- Parameters:
state
- the state- Returns:
- token
- Throws:
TokenHandlerException
- on failure to generate token
-
validate
Deprecated.Description copied from interface:TokenHandler
Validates the passed token.- Specified by:
validate
in interfaceTokenHandler
- Parameters:
snapshotToken
- the token to be validated- Throws:
InvalidTokenException
- on invalid tokenExpiredTokenException
- on expired tokenTokenHandlerException
- on other failure to validate token
-
validateAndExtractState
Deprecated.Description copied from interface:TokenHandler
Validates and parses the token, extracting any encapsulated state.- Specified by:
validateAndExtractState
in interfaceTokenHandler
- Parameters:
snapshotToken
- 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
-
SecretsJwtTokenHandler
instead.