org.keycloak.models

## Interface TokenManager

- All Known Implementing Classes:
    DefaultTokenManager

      public interface TokenManager

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static BiConsumer<JOSE,ClientModel>` | `DEFAULT_VALIDATOR`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default 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, BiConsumer<JOSE,ClientModel> jwtValidator, Class<T> clazz)`
    `default <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)`

- - ### 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, 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

          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)

    - #### 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.