org.keycloak.models.sessions.infinispan

## Class InfinispanActionTokenStoreProvider

- java.lang.Object
- - org.keycloak.models.sessions.infinispan.InfinispanActionTokenStoreProvider

- All Implemented Interfaces:
    ActionTokenStoreProvider, Provider

      public class InfinispanActionTokenStoreProvider
      extends Object
      implements ActionTokenStoreProvider

  Author:
    hmlnarik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InfinispanActionTokenStoreProvider(KeycloakSession session, org.infinispan.Cache<ActionTokenReducedKey,ActionTokenValueEntity> actionKeyCache)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `ActionTokenValueModel` | `get(ActionTokenKeyModel actionTokenKey)` Returns token corresponding to the given key from the internal action token store
    `void` | `put(ActionTokenKeyModel key, Map<String,String> notes)` Adds a given token to token store.
    `ActionTokenValueModel` | `remove(ActionTokenKeyModel actionTokenKey)` Removes token corresponding to the given key from the internal action token store, and returns the stored value

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InfinispanActionTokenStoreProvider

          public InfinispanActionTokenStoreProvider(KeycloakSession session,
                                                    org.infinispan.Cache<ActionTokenReducedKey,ActionTokenValueEntity> actionKeyCache)

  - ### Method Detail

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

    - #### put

          public void put(ActionTokenKeyModel key,
                          Map<String,String> notes)

      Description copied from interface: `ActionTokenStoreProvider`
      Adds a given token to token store.
      Specified by:
        `put` in interface `ActionTokenStoreProvider`
      Parameters:
        `key` - key
        `notes` - Optional notes to be stored with the token. Can be `null` in which case it is treated as an empty map.

    - #### get

          public ActionTokenValueModel get(ActionTokenKeyModel actionTokenKey)

      Description copied from interface: `ActionTokenStoreProvider`
      Returns token corresponding to the given key from the internal action token store
      Specified by:
        `get` in interface `ActionTokenStoreProvider`
      Parameters:
        `actionTokenKey` - key
      Returns:
        `null` if no token is found for given key and nonce, value otherwise

    - #### remove

          public ActionTokenValueModel remove(ActionTokenKeyModel actionTokenKey)

      Description copied from interface: `ActionTokenStoreProvider`
      Removes token corresponding to the given key from the internal action token store, and returns the stored value
      Specified by:
        `remove` in interface `ActionTokenStoreProvider`
      Parameters:
        `actionTokenKey` - key
      Returns:
        `null` if no token is found for given key and nonce, value otherwise

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