public class JWKOpenIdResolverImpl extends BaseOpenIdResolver
CLIENT_SECRET_KEY, ISSUER_KEY, JWK, KEY_ALIAS_KEY, KEYSTORE_LOCATION_KEY, KEYSTORE_PASS_KEY, KEYSTORE_TYPE_KEY, WELL_KNOWN_CONFIGURATION
Constructor and Description |
---|
JWKOpenIdResolverImpl(String issuer,
URL jwkUrl,
int readTimeout,
int connTimeout)
Constructor using provided timeout values to generate the
SimpleHTTPClient used for communicating over HTTP. |
JWKOpenIdResolverImpl(String issuer,
URL jwkUrl,
SimpleHTTPClient httpClient)
Constructor using an already-created
SimpleHTTPClient . |
Modifier and Type | Method and Description |
---|---|
void |
validateIdentity(SignedJwt idClaim)
Validates the supplied Jwt against this OpenId Connect Idp.
|
void |
verifySignature(SignedJwt idClaim)
Verifies that the JWS was signed by the supplied key.
|
createSigningHandlerForKey, getIssuer
public JWKOpenIdResolverImpl(String issuer, URL jwkUrl, int readTimeout, int connTimeout) throws FailedToLoadJWKException
SimpleHTTPClient
used for communicating over HTTP.issuer
- The issuer (provider) of the Open Id Connect id tokenjwkUrl
- the URL from which we will attempt to read and parse our JWKSetreadTimeout
- the read timeout associated with HTTP requestsconnTimeout
- the connection timeout associated with HTTP requestsFailedToLoadJWKException
- if there were issues resolving or parsing the JWKpublic JWKOpenIdResolverImpl(String issuer, URL jwkUrl, SimpleHTTPClient httpClient) throws FailedToLoadJWKException
SimpleHTTPClient
.issuer
- The issuer (provider) of the Open Id Connect id tokenjwkUrl
- The URL from which we will attempt to read and parse our JWKSethttpClient
- The http client through which we will attempt to read the jwkUrlFailedToLoadJWKException
- if there were issues resolving or parsing the JWK.public void validateIdentity(SignedJwt idClaim) throws OpenIdConnectVerificationException
validateIdentity
in interface OpenIdResolver
validateIdentity
in class BaseOpenIdResolver
idClaim
- The Jwt to test is authenticated from this issuerOpenIdConnectVerificationException
- If the Jwt is unable to be verifiedpublic void verifySignature(SignedJwt idClaim) throws InvalidSignatureException, FailedToLoadJWKException
idClaim
- The JWS to verifyInvalidSignatureException
- If the JWS supplied does not match the key for this resolverFailedToLoadJWKException
- If the JWK supplied cannot be loaded from its remote locationCopyright © 2025 Open Identity Platform Community. All rights reserved.