Package org.keycloak.models
Interface TokenManager
- All Known Implementing Classes:
DefaultTokenManager
public interface TokenManager
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncekManagementAlgorithm
(TokenCategory category) <T extends Token>
TDecodes and verifies the token, ornull
if the token was invaliddefault <T> T
decodeClientJWT
(String token, ClientModel client, Class<T> clazz) <T> T
decodeClientJWT
(String token, ClientModel client, BiConsumer<JOSE, ClientModel> jwtValidator, Class<T> clazz) Encodes the supplied tokenencodeAndEncrypt
(Token token) encryptAlgorithm
(TokenCategory category) initLogoutToken
(ClientModel client, UserModel user, AuthenticatedClientSessionModel clientSessionModel) signatureAlgorithm
(TokenCategory category)
-
Field Details
-
DEFAULT_VALIDATOR
-
-
Method Details
-
encode
Encodes the supplied token- Parameters:
token
- the token to encode- Returns:
- The encoded token
-
decode
Decodes and verifies the token, ornull
if the token was invalid- Type Parameters:
T
-- Parameters:
token
- the token to decodeclazz
- the token type to return- Returns:
- The decoded token, or
null
if the token was not valid
-
signatureAlgorithm
-
decodeClientJWT
- Type Parameters:
T
-- Parameters:
token
-client
-clazz
-- Returns:
-
decodeClientJWT
<T> T decodeClientJWT(String token, ClientModel client, BiConsumer<JOSE, ClientModel> jwtValidator, Class<T> clazz) -
encodeAndEncrypt
-
cekManagementAlgorithm
-
encryptAlgorithm
-
initLogoutToken
LogoutToken initLogoutToken(ClientModel client, UserModel user, AuthenticatedClientSessionModel clientSessionModel)
-