Package org.forgerock.oauth.resolvers
Class WellKnownOpenIdConfigurationFactory
java.lang.Object
org.forgerock.oauth.resolvers.WellKnownOpenIdConfigurationFactory
This class creates JWKOpenIdResolverImpl's from a supplied
well-known open id configuration url.
-
Constructor Summary
ConstructorDescriptionWellKnownOpenIdConfigurationFactory
(int readTimeout, int connTimeout) Deprecated.Use org.forgerock.oauth.resolvers.WellKnownOpenIdConfigurationFactory# WellKnownOpenIdConfigurationFactory(org.forgerock.http.Client) insteadDeprecated.Use org.forgerock.oauth.resolvers.WellKnownOpenIdConfigurationFactory# WellKnownOpenIdConfigurationFactory(org.forgerock.http.Client, java.time.Clock) insteadWellKnownOpenIdConfigurationFactory
(Client client, Clock clock) Generates a factory that will use the given client when attempting to read the data form a remote location. -
Method Summary
Modifier and TypeMethodDescriptionReturns a JWKOpenIdResolverImpl representing the contents of the supplied URL.Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL.buildAsync
(String configuredIssuer, URL configUrl) Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL.buildAsync
(BiPredicate<String, String> issuerComparator, String configuredIssuer, URL configUrl) Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL.Get the JWKS store service.
-
Constructor Details
-
WellKnownOpenIdConfigurationFactory
Deprecated.Use org.forgerock.oauth.resolvers.WellKnownOpenIdConfigurationFactory# WellKnownOpenIdConfigurationFactory(org.forgerock.http.Client) insteadGenerates a factory that will use the given timeouts when attempting to read the data form a remote location.- Parameters:
readTimeout
- set the read timeout of HTTP operations in this factoryconnTimeout
- set the connection timeout of HTTP operations in this factory
-
WellKnownOpenIdConfigurationFactory
Deprecated.Use org.forgerock.oauth.resolvers.WellKnownOpenIdConfigurationFactory# WellKnownOpenIdConfigurationFactory(org.forgerock.http.Client, java.time.Clock) insteadGenerates a factory that will use the given client when attempting to read the data form a remote location. Uses systemUTC by default for measuring timeouts.- Parameters:
client
- the client to use
-
WellKnownOpenIdConfigurationFactory
Generates a factory that will use the given client when attempting to read the data form a remote location.- Parameters:
client
- the client to useclock
- to use for measuring timeouts.
-
-
Method Details
-
buildAsync
public Promise<JWKOpenIdResolverImpl,FailedToLoadJWKException> buildAsync(String configuredIssuer, URL configUrl) Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL. UsesIssuerComparators.DEFAULT
for comparing issuer values by exact string comparison.- Parameters:
configuredIssuer
- The configured issuer's reference nameconfigUrl
- URL from which to read the JWKSet- Returns:
- a promise of a usable JWKOpenIdResolverIMpl, or a FailedToLoadJWKException if there are issues reading or parsing the configUrl
-
buildAsync
public Promise<JWKOpenIdResolverImpl,FailedToLoadJWKException> buildAsync(BiPredicate<String, String> issuerComparator, String configuredIssuer, URL configUrl) Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL.- Parameters:
issuerComparator
- The comparator for comparing the incoming issuer value against the expected value.configuredIssuer
- The configured issuer's reference nameconfigUrl
- URL from which to read the JWKSet- Returns:
- a promise of a usable JWKOpenIdResolverIMpl, or a FailedToLoadJWKException if there are issues reading or parsing the configUrl
-
build
public JWKOpenIdResolverImpl build(String configuredIssuer, URL configUrl) throws FailedToLoadJWKException Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL. UsesIssuerComparators.DEFAULT
for comparing issuer values by exact string comparison.- Parameters:
configuredIssuer
- The configured issuer's reference nameconfigUrl
- URL from which to read the JWKSet- Returns:
- a usable JWKOpenIdResolverIMpl
- Throws:
FailedToLoadJWKException
- if there are issues reading or parsing the configUrl
-
build
public JWKOpenIdResolverImpl build(BiPredicate<String, String> issuerComparator, String configuredIssuer, URL configUrl) throws FailedToLoadJWKExceptionReturns a JWKOpenIdResolverImpl representing the contents of the supplied URL.- Parameters:
issuerComparator
- The comparator for comparing the incoming issuer value against the expected value.configuredIssuer
- The configured issuer's reference nameconfigUrl
- URL from which to read the JWKSet- Returns:
- a usable JWKOpenIdResolverIMpl
- Throws:
FailedToLoadJWKException
- if there are issues reading or parsing the configUrl
-
getJwksStoreService
Get the JWKS store service.- Returns:
- JWKS store service.
-