Class DefaultJWKSetCache

    • Constructor Detail

      • DefaultJWKSetCache

        public DefaultJWKSetCache()
        Deprecated.
        Creates a new JWK set, the default lifespan of the cached JWK set is set to 15 minutes, the refresh time to 5 minutes.
      • DefaultJWKSetCache

        public DefaultJWKSetCache​(long lifespan,
                                  long refreshTime,
                                  TimeUnit timeUnit)
        Deprecated.
        Creates a new JWK set cache.
        Parameters:
        lifespan - The lifespan of the cached JWK set before it expires, negative means no expiration.
        refreshTime - The time after which the cached JWK set is marked for refresh, negative if not specified. Should be shorter or equal to the lifespan.
        timeUnit - The lifespan time unit, may be null if no expiration or refresh time.
    • Method Detail

      • put

        public void put​(JWKSet jwkSet)
        Deprecated.
        Description copied from interface: JWKSetCache
        Puts the specified JWK set into the cache or clears the cache.
        Specified by:
        put in interface JWKSetCache
        Parameters:
        jwkSet - The JWK set to cache, null to clear the cache.
      • get

        public JWKSet get()
        Deprecated.
        Description copied from interface: JWKSetCache
        Gets the cached JWK set.
        Specified by:
        get in interface JWKSetCache
        Returns:
        The cached JWK set, null if none or expired.
      • requiresRefresh

        public boolean requiresRefresh()
        Deprecated.
        Description copied from interface: JWKSetCache
        Returns true if the cached JWK set requires a refresh. This should typically occur some time before the cache has expired, to allow for transient retrieval exceptions before expiration.
        Specified by:
        requiresRefresh in interface JWKSetCache
        Returns:
        true if the cached JWK set requires a refresh.
      • getPutTimestamp

        public long getPutTimestamp()
        Deprecated.
        Returns the cache put timestamp.
        Returns:
        The cache put timestamp, negative if not specified.
      • isExpired

        public boolean isExpired()
        Deprecated.
        Returns true if the cached JWK set is expired.
        Returns:
        true if expired.
      • getLifespan

        public long getLifespan​(TimeUnit timeUnit)
        Deprecated.
        Returns the configured lifespan of the cached JWK.
        Parameters:
        timeUnit - The time unit to use.
        Returns:
        The configured lifespan, negative means no expiration.
      • getRefreshTime

        public long getRefreshTime​(TimeUnit timeUnit)
        Deprecated.
        Returns the configured refresh time of the cached JWK.
        Parameters:
        timeUnit - The time unit to use.
        Returns:
        The configured refresh time, negative means no expiration.