Class AccessTokenCacheImpl

  • All Implemented Interfaces:
    AccessTokenCache, org.springframework.beans.factory.DisposableBean

    public class AccessTokenCacheImpl
    extends Object
    implements AccessTokenCache, org.springframework.beans.factory.DisposableBean
    The access token cache implementation.
    Author:
    Christian Bremer
    • Constructor Detail

      • AccessTokenCacheImpl

        public AccessTokenCacheImpl()
        Instantiates a new access token cache.
      • AccessTokenCacheImpl

        public AccessTokenCacheImpl​(Duration expirationTimeThreshold,
                                    String keyPrefix)
        Instantiates a new access token cache.
        Parameters:
        expirationTimeThreshold - the expiration time threshold
        keyPrefix - the key prefix
      • AccessTokenCacheImpl

        public AccessTokenCacheImpl​(org.springframework.cache.Cache cache)
        Instantiates a new access token cache.
        Parameters:
        cache - the external cache
      • AccessTokenCacheImpl

        public AccessTokenCacheImpl​(org.springframework.cache.Cache cache,
                                    Duration expirationTimeThreshold,
                                    String keyPrefix)
        Instantiates a new access token cache.
        Parameters:
        cache - the cache
        expirationTimeThreshold - the expiration time threshold
        keyPrefix - the key prefix
    • Method Detail

      • putAccessToken

        public void putAccessToken​(String key,
                                   String accessToken)
        Description copied from interface: AccessTokenCache
        Put new access token into the cache.
        Specified by:
        putAccessToken in interface AccessTokenCache
        Parameters:
        key - the key
        accessToken - the access token
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean