Class BoundedCachingAccessTokenResolver
java.lang.Object
org.forgerock.opendj.hdap.BoundedCachingAccessTokenResolver
- All Implemented Interfaces:
org.forgerock.http.oauth2.AccessTokenResolver
public final class BoundedCachingAccessTokenResolver
extends Object
implements org.forgerock.http.oauth2.AccessTokenResolver
Access token resolver with bounded, access-order caching.
-
Constructor Summary
ConstructorsConstructorDescriptionBoundedCachingAccessTokenResolver(Clock clock, org.forgerock.http.oauth2.AccessTokenResolver resolver, int maxCacheTokens) Creates a resolver with a bounded LRU cache of access-token resolutions. -
Method Summary
Modifier and TypeMethodDescriptionPromise<org.forgerock.http.oauth2.AccessTokenInfo, org.forgerock.http.oauth2.AccessTokenException> resolve(org.forgerock.services.context.Context context, Supplier<org.forgerock.http.protocol.Request, IOException> request, String token) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.forgerock.http.oauth2.AccessTokenResolver
resolve
-
Constructor Details
-
BoundedCachingAccessTokenResolver
public BoundedCachingAccessTokenResolver(Clock clock, org.forgerock.http.oauth2.AccessTokenResolver resolver, int maxCacheTokens) Creates a resolver with a bounded LRU cache of access-token resolutions.- Parameters:
clock- clock used to check token expiryresolver- resolver used for cache missesmaxCacheTokens- maximum number of cached tokens
-
-
Method Details
-
resolve
public Promise<org.forgerock.http.oauth2.AccessTokenInfo, org.forgerock.http.oauth2.AccessTokenException> resolve(org.forgerock.services.context.Context context, Supplier<org.forgerock.http.protocol.Request, IOException> request, String token) - Specified by:
resolvein interfaceorg.forgerock.http.oauth2.AccessTokenResolver
-