public class CachingAccessTokenResolver extends Object implements AccessTokenResolver
CachingAccessTokenResolver
is a delegating AccessTokenResolver
that uses a write-through cache
to enable fast AccessToken
resolution.Constructor and Description |
---|
CachingAccessTokenResolver(AccessTokenResolver resolver,
ThreadSafeCache<String,AccessToken> cache)
Builds a
CachingAccessTokenResolver delegating to the given AccessTokenResolver using the given
(pre-configured) cache. |
public CachingAccessTokenResolver(AccessTokenResolver resolver, ThreadSafeCache<String,AccessToken> cache)
CachingAccessTokenResolver
delegating to the given AccessTokenResolver
using the given
(pre-configured) cache.resolver
- resolver to delegates tocache
- access token cachepublic AccessToken resolve(String token) throws OAuth2TokenException
AccessTokenResolver
resolve
in interface AccessTokenResolver
token
- token identifier to be resolvedAccessToken
(well formed, known by the server)OAuth2TokenException
- if the token is unknown by the serverCopyright © 2014 ForgeRock AS. All rights reserved.