org.keycloak.models.sessions.infinispan

## Class InfinispanPushedAuthzRequestStoreProvider

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

- All Implemented Interfaces:
    PushedAuthzRequestStoreProvider, Provider

      public class InfinispanPushedAuthzRequestStoreProvider
      extends Object
      implements PushedAuthzRequestStoreProvider

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static org.jboss.logging.Logger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InfinispanPushedAuthzRequestStoreProvider(KeycloakSession session, Supplier<org.infinispan.commons.api.BasicCache<UUID,ActionTokenValueEntity>> actionKeyCache)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `put(UUID key, int lifespanSeconds, Map<String,String> codeData)` Stores the given data and guarantees that data should be available in the store for at least the time specified by parameter.
    `Map<String,String>` | `remove(UUID key)` This method returns data just if removal was successful.

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

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

- - ### Field Detail

    - #### logger

          public static final org.jboss.logging.Logger logger

  - ### Constructor Detail

    - #### InfinispanPushedAuthzRequestStoreProvider

          public InfinispanPushedAuthzRequestStoreProvider(KeycloakSession session,
                                                           Supplier<org.infinispan.commons.api.BasicCache<UUID,ActionTokenValueEntity>> actionKeyCache)

  - ### Method Detail

    - #### put

          public void put(UUID key,
                          int lifespanSeconds,
                          Map<String,String> codeData)

      Description copied from interface: `PushedAuthzRequestStoreProvider`
      Stores the given data and guarantees that data should be available in the store for at least the time specified by parameter.
      Specified by:
        `put` in interface `PushedAuthzRequestStoreProvider`
      Parameters:
        `key` - unique identifier
        `lifespanSeconds` - time to live
        `codeData` - the data to store

    - #### remove

          public Map<String,String> remove(UUID key)

      Description copied from interface: `PushedAuthzRequestStoreProvider`
      This method returns data just if removal was successful. Implementation should guarantee that "remove" is single-use. So if 2 threads (even on different cluster nodes or on different cross-dc nodes) calls "remove(123)" concurrently, then just one of them is allowed to succeed and return data back. It can't happen that both will succeed.
      Specified by:
        `remove` in interface `PushedAuthzRequestStoreProvider`
      Parameters:
        `key` - unique identifier
      Returns:
        context data related Pushed Authorization Request. It returns null if there is no context data available.

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

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