public class OidcConfigurationServiceWithCache extends Object
OidcConfigurationService with a cache, which gets looked up
before the identity service is requested via http.| Modifier and Type | Method and Description |
|---|---|
void |
clearCache() |
static OidcConfigurationServiceWithCache |
getInstance()
Creates a new instance.
|
OAuth2ServiceEndpointsProvider |
getOrRetrieveEndpoints(URI discoveryEndpointUri)
Returns the cached key by id and type or requests the keys from the jwks URI
of the identity service.
|
OidcConfigurationServiceWithCache |
withCacheSize(int size)
Caches the Json web keys.
|
OidcConfigurationServiceWithCache |
withCacheTime(int timeInSeconds)
Caches the Json web keys.
|
OidcConfigurationServiceWithCache |
withOidcConfigurationService(OidcConfigurationService oidcConfigurationService)
Overwrites the service to be used to request the oidc configuration.
|
public static OidcConfigurationServiceWithCache getInstance()
public OidcConfigurationServiceWithCache withOidcConfigurationService(OidcConfigurationService oidcConfigurationService)
oidcConfigurationService - * the OidcConfigurationService that will be used to request the
oidc configuration.public OidcConfigurationServiceWithCache withCacheTime(int timeInSeconds)
timeInSeconds - time to cache the signing keyspublic OidcConfigurationServiceWithCache withCacheSize(int size)
size - number of cached json web keys.@Nullable public OAuth2ServiceEndpointsProvider getOrRetrieveEndpoints(URI discoveryEndpointUri) throws OAuth2ServiceException
discoveryEndpointUri - the discovery endpoint URI (issuer specific).OAuth2ServiceException - in case the call to the jwks endpoint of the identity service
failed.public void clearCache()
Copyright © 2020. All rights reserved.