Package org.forgerock.oauth.resolvers
Class BaseOpenIdResolver
java.lang.Object
org.forgerock.oauth.resolvers.BaseOpenIdResolver
- All Implemented Interfaces:
GenericOpenIdResolver<SignedJwt>
,OpenIdResolver
- Direct Known Subclasses:
JWKOpenIdResolverImpl
,PublicKeyOpenIdResolverImpl
,SharedSecretOpenIdResolverImpl
Implementation of the OpenIdResolver interface. Comments in the specific verify methods
are taken directly from OpenID Connect Basic Client Implementer's Guide 1.0,
section 2.2.1 - ID Token Validation
Currently we do NO validation against the client ID/intended audience.
-
Field Summary
Fields inherited from interface org.forgerock.oauth.resolvers.OpenIdResolver
CLIENT_SECRET_KEY, ISSUER_KEY, JWK, KEY_ALIAS_KEY, KEYSTORE_LOCATION_KEY, KEYSTORE_PASS_KEY, KEYSTORE_TYPE_KEY, WELL_KNOWN_CONFIGURATION
-
Constructor Summary
ConstructorDescriptionBaseOpenIdResolver
(String issuer) Abstract constructor for setting the issuer's identity.BaseOpenIdResolver
(BiPredicate<String, String> issuerComparator, String issuer) Abstract constructor for setting the issuer's identity. -
Method Summary
Modifier and TypeMethodDescriptionReturns the issuer (IdP) for which this resolver will resolve identities.void
validateIdentity
(SignedJwt idClaim) Validates the supplied Jwt against this OpenId Connect Idp.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.forgerock.oauth.resolvers.OpenIdResolver
getExpectedJwtType
-
Constructor Details
-
BaseOpenIdResolver
Abstract constructor for setting the issuer's identity. UsesIssuerComparators.DEFAULT
for comparing issuer values by exact string comparison.- Parameters:
issuer
- The issuer (provider) of the Open Id Connect id token
-
BaseOpenIdResolver
Abstract constructor for setting the issuer's identity.- Parameters:
issuerComparator
- The comparator for comparing the incoming issuer value against the expected value.issuer
- The issuer (provider) of the Open Id Connect id token
-
-
Method Details
-
validateIdentity
Validates the supplied Jwt against this OpenId Connect Idp.- Specified by:
validateIdentity
in interfaceGenericOpenIdResolver<SignedJwt>
- Parameters:
idClaim
- The Jwt to test is authenticated- Throws:
OpenIdConnectVerificationException
- If the Jwt is unable to be verified
-
getIssuer
Returns the issuer (IdP) for which this resolver will resolve identities.- Specified by:
getIssuer
in interfaceOpenIdResolver
- Returns:
- the name of the issuer
-