org.keycloak.models

## Interface TokenManager

- All Known Implementing Classes:
    DefaultTokenManager

      public interface TokenManager

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `cekManagementAlgorithm(TokenCategory category)`
    `<T extends Token> T` | `decode(String token, Class<T> clazz)` Decodes and verifies the token, or `null` if the token was invalid
    `<T> T` | `decodeClientJWT(String token, ClientModel client, Class<T> clazz)`
    `String` | `encode(Token token)` Encodes the supplied token
    `String` | `encodeAndEncrypt(Token token)`
    `String` | `encryptAlgorithm(TokenCategory category)`
    `LogoutToken` | `initLogoutToken(ClientModel client, UserModel user, AuthenticatedClientSessionModel clientSessionModel)`
    `String` | `signatureAlgorithm(TokenCategory category)`

- - ### 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, or `null` if the token was invalid
      Type Parameters:
        `T` -
      Parameters:
        `token` - the token to decode
        `clazz` - the token type to return
      Returns:
        The decoded token, or `null` if the token was not valid

    - #### signatureAlgorithm

          String signatureAlgorithm(TokenCategory category)

    - #### decodeClientJWT

          <T> T decodeClientJWT(String token,
                                ClientModel client,
                                Class<T> clazz)

    - #### encodeAndEncrypt

          String encodeAndEncrypt(Token token)

    - #### cekManagementAlgorithm

          String cekManagementAlgorithm(TokenCategory category)

    - #### encryptAlgorithm

          String encryptAlgorithm(TokenCategory category)

    - #### initLogoutToken

          LogoutToken initLogoutToken(ClientModel client,
                                      UserModel user,
                                      AuthenticatedClientSessionModel clientSessionModel)

Copyright © 2021 JBoss by Red Hat. All rights reserved.