Package org.forgerock.oauth.resolvers
Class OpenIdResolverFactory
java.lang.Object
org.forgerock.oauth.resolvers.OpenIdResolverFactory
For producing OpenId Resolvers.
-
Constructor Summary
ConstructorDescriptionOpenIdResolverFactory
(int readTimeout, int connTimeout) Deprecated.Use org.forgerock.oauth.resolvers.OpenIdResolverFactory#OpenIdResolverFactory (org.forgerock.http.Client) insteadOpenIdResolverFactory
(Client client) For generating an OpenIDResolverFactory with the supplied client which will be used for all HTTP communication originating form this factory.OpenIdResolverFactory
(Client client, BiPredicate<String, String> issuerComparator) For generating an OpenIDResolverFactory with the supplied client which will be used for all HTTP communication originating form this factory. -
Method Summary
Modifier and TypeMethodDescriptioncreateFromOpenIDConfigUrl
(String issuer, URL configUrl) Creates a public key resolver for the supplied issuer using keys supplied at the .well-known open ID configuration URL.createJWKResolver
(String issuer, URL jwkUrl) Creates a public key resolver for the supplied issuer using keys supplied at the JWK Set URL.createJWKResolver
(String issuer, URL jwkUrl, int readTimeout, int connTimeout) Deprecated.Replaced bycreateJWKResolver(String, URL)
()}createPublicKeyResolver
(String issuer, PublicKey key) Creates a public key resolver for the supplied issuer.createSecretsProviderResolver
(String issuer, SecretsProvider provider, Purpose<VerificationKey> purpose) Creates a public key based resolver for the suppliedissuer
using keys available through the givenprovider
.createSharedSecretResolver
(String issuer, String sharedSecret) Creates a shared secret (HMAC) key resolver for the supplied issuer.
-
Constructor Details
-
OpenIdResolverFactory
For generating an OpenIDResolverFactory with the supplied client which will be used for all HTTP communication originating form this factory. UsesIssuerComparators.DEFAULT
for comparing issuer values by exact string comparison.- Parameters:
client
- The client to use
-
OpenIdResolverFactory
For generating an OpenIDResolverFactory with the supplied client which will be used for all HTTP communication originating form this factory.- Parameters:
client
- The client to useissuerComparator
- The comparator for comparing the incoming issuer value against the expected value.
-
OpenIdResolverFactory
Deprecated.Use org.forgerock.oauth.resolvers.OpenIdResolverFactory#OpenIdResolverFactory (org.forgerock.http.Client) insteadFor generating an OpenIDResolverFactory with the supplied timeouts which will be used for all HTTP communication originating form this factory.- Parameters:
readTimeout
- HTTP read timeout for produced resolversconnTimeout
- HTTP connection timeout for produced resolvers
-
-
Method Details
-
createPublicKeyResolver
Creates a public key resolver for the supplied issuer.- Parameters:
issuer
- The issuer's reference namekey
- Key to use for this issuer- Returns:
- a configured and usable PublicKeyOpenIdResolverImpl
-
createJWKResolver
@Deprecated public OpenIdResolver createJWKResolver(String issuer, URL jwkUrl, int readTimeout, int connTimeout) throws FailedToLoadJWKException Deprecated.Replaced bycreateJWKResolver(String, URL)
()}SeecreateJWKResolver(String, URL)
()}.- Parameters:
issuer
- The issuer's reference namejwkUrl
- From which to read the JWK SetreadTimeout
- read timeout setting for HTTP connectionsconnTimeout
- connection timeout setting for HTTP connections- Returns:
- a configured and usable JWKOpenIdResolverImpl
- Throws:
FailedToLoadJWKException
- If there were problems reading or configuring data from the URL
-
createJWKResolver
Creates a public key resolver for the supplied issuer using keys supplied at the JWK Set URL.- Parameters:
issuer
- The issuer's reference namejwkUrl
- From which to read the JWK Set- Returns:
- a configured and usable JWKOpenIdResolverImpl
- Throws:
FailedToLoadJWKException
- If there were problems reading or configuring data from the URL
-
createSecretsProviderResolver
public OpenIdResolver createSecretsProviderResolver(String issuer, SecretsProvider provider, Purpose<VerificationKey> purpose) Creates a public key based resolver for the suppliedissuer
using keys available through the givenprovider
.The JWT kid attribute is used as secret's stable ID when looking up the secret.
- Parameters:
issuer
- The issuer's reference nameprovider
- Secrets providerpurpose
- verification key purpose- Returns:
- a configured and usable SecretsProviderOpenIdResolver
-
createFromOpenIDConfigUrl
public OpenIdResolver createFromOpenIDConfigUrl(String issuer, URL configUrl) throws FailedToLoadJWKException Creates a public key resolver for the supplied issuer using keys supplied at the .well-known open ID configuration URL.- Parameters:
issuer
- The issuer's reference nameconfigUrl
- Location of the .well-known Open ID Connect config- Returns:
- a configured and usable JWKOpenIdResolverImpl
- Throws:
FailedToLoadJWKException
- If there were problems reading or configuring data from the URL
-