public class GuavaCachedJwkProvider extends Object implements JwkProvider
Constructor and Description |
---|
GuavaCachedJwkProvider(JwkProvider provider)
Creates a new provider that will cache up to 5 jwks for at most 10 hours
|
GuavaCachedJwkProvider(JwkProvider provider,
long size,
long expiresIn,
TimeUnit expiresUnit)
Creates a new cached provider specifying cache size and ttl
|
public GuavaCachedJwkProvider(JwkProvider provider)
provider
- fallback provider to use when jwk is not cachedpublic GuavaCachedJwkProvider(JwkProvider provider, long size, long expiresIn, TimeUnit expiresUnit)
provider
- fallback provider to use when jwk is not cachedsize
- number of jwt to cacheexpiresIn
- amount of time a jwk will live in the cacheexpiresUnit
- unit of the expiresIn parameterpublic Jwk get(String keyId) throws JwkException
JwkProvider
get
in interface JwkProvider
keyId
- value of kid found in JWTSigningKeyNotFoundException
- if no jwk can be found using the give kidJwkException
Copyright © 2016. All Rights Reserved.