public class JwksStore extends Object
Modifier and Type | Method and Description |
---|---|
JWK |
findJwk(Algorithm algorithm,
KeyUse keyUse)
Search for a JWK that matches the algorithm and the key usage.
|
JWK |
findJwk(String kid)
Search for a JWK that matches the kid.
|
Duration |
getCacheMissCacheTime()
Get the cache time before reload the cache in case of cache miss.
|
Duration |
getCacheTimeout()
Get the cache timeout.
|
URL |
getJwkUrl()
The JWKs URI.
|
void |
setCacheMissCacheTime(Duration cacheMissCacheTime)
Update the cache time before reload the cache in case of cache miss.
|
void |
setCacheTimeout(Duration cacheTimeout)
Update the cache timeout.
|
void |
setJwkUrl(URL jwkUrl)
Update the JWKs URI.
|
public JWK findJwk(Algorithm algorithm, KeyUse keyUse) throws FailedToLoadJWKException
algorithm
- the algorithm neededkeyUse
- the key usage. If null, only the algorithm will be used as a search criteria.FailedToLoadJWKException
- if the jwks can't be reloaded.public JWK findJwk(String kid) throws FailedToLoadJWKException
kid
- Key IDFailedToLoadJWKException
- if the jwks can't be reloaded.public Duration getCacheTimeout()
public Duration getCacheMissCacheTime()
public URL getJwkUrl()
public void setCacheTimeout(Duration cacheTimeout)
cacheTimeout
- the cache timeout.public void setCacheMissCacheTime(Duration cacheMissCacheTime)
cacheMissCacheTime
- the cache miss cache time.public void setJwkUrl(URL jwkUrl) throws FailedToLoadJWKException
jwkUrl
- the jwks uri.FailedToLoadJWKException
- If the URI has changed and the JWK set cannot be loaded.Copyright 2010-2020 ForgeRock AS.