Package org.keycloak.jose.jws
Class DefaultTokenManager
- java.lang.Object
- 
- org.keycloak.jose.jws.DefaultTokenManager
 
- 
- All Implemented Interfaces:
- TokenManager
 
 public class DefaultTokenManager extends Object implements TokenManager 
- 
- 
Field Summary- 
Fields inherited from interface org.keycloak.models.TokenManagerDEFAULT_VALIDATOR
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultTokenManager(KeycloakSession session)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcekManagementAlgorithm(TokenCategory category)<T extends Token>
 Tdecode(String token, Class<T> clazz)Decodes and verifies the token, ornullif the token was invalid<T> TdecodeClientJWT(String jwt, ClientModel client, BiConsumer<JOSE,ClientModel> jwtValidator, Class<T> clazz)Stringencode(Token token)Encodes the supplied tokenStringencodeAndEncrypt(Token token)StringencryptAlgorithm(TokenCategory category)LogoutTokeninitLogoutToken(ClientModel client, UserModel user, AuthenticatedClientSessionModel clientSession)StringsignatureAlgorithm(TokenCategory category)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.keycloak.models.TokenManagerdecodeClientJWT
 
- 
 
- 
- 
- 
Constructor Detail- 
DefaultTokenManagerpublic DefaultTokenManager(KeycloakSession session) 
 
- 
 - 
Method Detail- 
encodepublic String encode(Token token) Description copied from interface:TokenManagerEncodes the supplied token- Specified by:
- encodein interface- TokenManager
- Parameters:
- token- the token to encode
- Returns:
- The encoded token
 
 - 
decodepublic <T extends Token> T decode(String token, Class<T> clazz) Description copied from interface:TokenManagerDecodes and verifies the token, ornullif the token was invalid- Specified by:
- decodein interface- TokenManager
- Parameters:
- token- the token to decode
- clazz- the token type to return
- Returns:
- The decoded token, or nullif the token was not valid
 
 - 
decodeClientJWTpublic <T> T decodeClientJWT(String jwt, ClientModel client, BiConsumer<JOSE,ClientModel> jwtValidator, Class<T> clazz) - Specified by:
- decodeClientJWTin interface- TokenManager
 
 - 
signatureAlgorithmpublic String signatureAlgorithm(TokenCategory category) - Specified by:
- signatureAlgorithmin interface- TokenManager
 
 - 
encodeAndEncryptpublic String encodeAndEncrypt(Token token) - Specified by:
- encodeAndEncryptin interface- TokenManager
 
 - 
cekManagementAlgorithmpublic String cekManagementAlgorithm(TokenCategory category) - Specified by:
- cekManagementAlgorithmin interface- TokenManager
 
 - 
encryptAlgorithmpublic String encryptAlgorithm(TokenCategory category) - Specified by:
- encryptAlgorithmin interface- TokenManager
 
 - 
initLogoutTokenpublic LogoutToken initLogoutToken(ClientModel client, UserModel user, AuthenticatedClientSessionModel clientSession) - Specified by:
- initLogoutTokenin interface- TokenManager
 
 
- 
 
-