Class CaffeineCacheAccessTokenResolver

java.lang.Object
org.forgerock.openig.filter.oauth2.CaffeineCacheAccessTokenResolver
All Implemented Interfaces:
Closeable, AutoCloseable, AccessTokenResolver

public final class CaffeineCacheAccessTokenResolver extends Object implements AccessTokenResolver, Closeable
A CaffeineCacheAccessTokenResolver is a delegating AccessTokenResolver that uses a write-through Caffeine cache to enable fast AccessTokenInfo resolution.
 
 {
      "type": "CacheAccessTokenResolver",
      "config": {
          "delegate"           :  AccessTokenResolver   [REQUIRED]
          "enabled"            :  expression            [OPTIONAL - default to true.]
          "defaultTimeout"     :  duration              [OPTIONAL - default to 1 minute.]
          "executor"           :  executor              [OPTIONAL - by default, ForkJoinPool#commonPool()
                                                                    is used.]
          "maximumSize"        :  expression(long)      [OPTIONAL - sets the maximum size of the cache.]
          "maximumTimeToCache" :  duration              [OPTIONAL - "zero" and "unlimited" are
                                                                    not acceptable values.]
          "amService"          : AmService              [OPTIONAL - enables the additional features of the AM token
                                                                    notification service to keep the cache in a
                                                                    consistent state. Only makes sense when working
                                                                    with AM and using a token resolver endpoint that
                                                                    provides the necessary metadata required by
                                                                    the cache.]
          "onNotificationDisconnection" :  enum         [OPTIONAL - what to do if AM goes offline:
                                                                    NEVER_CLEAR, CLEAR_ON_DISCONNECT,
                                                                    CLEAR_ON_RECONNECT.
                                                                    Default is: CLEAR_ON_DISCONNECT.]
      }
  }