Package org.keycloak.models
Interface TokenManager
-
- All Known Implementing Classes:
DefaultTokenManager
public interface TokenManager
-
-
Field Summary
Fields Modifier and Type Field Description static BiConsumer<JOSE,ClientModel>DEFAULT_VALIDATOR
-
Method Summary
All Methods Instance Methods Abstract Methods Default 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 invaliddefault <T> TdecodeClientJWT(String token, ClientModel client, Class<T> clazz)<T> TdecodeClientJWT(String token, 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 clientSessionModel)StringsignatureAlgorithm(TokenCategory category)
-
-
-
Field Detail
-
DEFAULT_VALIDATOR
static final BiConsumer<JOSE,ClientModel> DEFAULT_VALIDATOR
-
-
Method Detail
-
encode
String encode(Token token)
Encodes the supplied token- Parameters:
token- the token to encode- Returns:
- The encoded token
-
decode
<T extends Token> T decode(String token, Class<T> clazz)
Decodes and verifies the token, ornullif the token was invalid- Type Parameters:
T-- Parameters:
token- the token to decodeclazz- the token type to return- Returns:
- The decoded token, or
nullif the token was not valid
-
signatureAlgorithm
String signatureAlgorithm(TokenCategory category)
-
decodeClientJWT
default <T> T decodeClientJWT(String token, ClientModel client, Class<T> clazz)
- Type Parameters:
T-- Parameters:
token-client-clazz-- Returns:
-
decodeClientJWT
<T> T decodeClientJWT(String token, ClientModel client, BiConsumer<JOSE,ClientModel> jwtValidator, Class<T> clazz)
-
cekManagementAlgorithm
String cekManagementAlgorithm(TokenCategory category)
-
encryptAlgorithm
String encryptAlgorithm(TokenCategory category)
-
initLogoutToken
LogoutToken initLogoutToken(ClientModel client, UserModel user, AuthenticatedClientSessionModel clientSessionModel)
-
-