Package org.forgerock.oauth.resolvers
Class WellKnownOpenIdConfigurationFactory
- java.lang.Object
-
- org.forgerock.oauth.resolvers.WellKnownOpenIdConfigurationFactory
-
public class WellKnownOpenIdConfigurationFactory extends Object
This class creates JWKOpenIdResolverImpl's from a supplied well-known open id configuration url.
-
-
Constructor Summary
Constructors Constructor Description WellKnownOpenIdConfigurationFactory(int readTimeout, int connTimeout)
Deprecated.Use org.forgerock.oauth.resolvers.WellKnownOpenIdConfigurationFactory# WellKnownOpenIdConfigurationFactory(org.forgerock.http.Client) insteadWellKnownOpenIdConfigurationFactory(Client client)
Deprecated.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JWKOpenIdResolverImpl
build(String configuredIssuer, URL configUrl)
Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL.JWKOpenIdResolverImpl
build(BiPredicate<String,String> issuerComparator, String configuredIssuer, URL configUrl)
Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL.Promise<JWKOpenIdResolverImpl,FailedToLoadJWKException>
buildAsync(String configuredIssuer, URL configUrl)
Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL.Promise<JWKOpenIdResolverImpl,FailedToLoadJWKException>
buildAsync(BiPredicate<String,String> issuerComparator, String configuredIssuer, URL configUrl)
Returns a JWKOpenIdResolverImpl representing the contents of the supplied URL.JwksStoreService
getJwksStoreService()
Get the JWKS store service.
-
-
-
Constructor Detail
-
WellKnownOpenIdConfigurationFactory
@Deprecated public WellKnownOpenIdConfigurationFactory(int readTimeout, int connTimeout)
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
public WellKnownOpenIdConfigurationFactory(Client client)
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
-
-
Method Detail
-
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 FailedToLoadJWKException
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 usable JWKOpenIdResolverIMpl
- Throws:
FailedToLoadJWKException
- if there are issues reading or parsing the configUrl
-
getJwksStoreService
public JwksStoreService getJwksStoreService()
Get the JWKS store service.- Returns:
- JWKS store service.
-
-