Package org.forgerock.json.jose.jwk
Class JWKSetParser
java.lang.Object
org.forgerock.json.jose.jwk.JWKSetParser
Provides methods to gather a JWKSet from a URL and return
a map of key ids to keys as dictated by that JWKS.
-
Constructor Summary
ConstructorDescriptionJWKSetParser
(Client client) Alternative constructor allowing the calling class to pass in an already-configuredClient
.JWKSetParser
(Client client, JWKLookup jwkLookup) Alternative constructor allowing the calling class to pass in an already-configuredClient
. -
Method Summary
Modifier and TypeMethodDescriptionUses the Client to gather HTTP information.Deprecated.jwkSetAsync
(URL url) Provides a JWK set as indicated by the JWKSet's URL.jwkSetToMap
(JWKSet jwkSet) Converts a supplied JWKSet into a map of key:values, where the keys are the keyIds and the values are verification keys.
-
Constructor Details
-
JWKSetParser
Alternative constructor allowing the calling class to pass in an already-configuredClient
.- Parameters:
client
-Client
used to gather HTTP information
-
JWKSetParser
Alternative constructor allowing the calling class to pass in an already-configuredClient
.- Parameters:
client
-Client
used to gather HTTP informationjwkLookup
- to convert the jwk into a real key
-
-
Method Details
-
gatherHttpContentsAsync
Uses the Client to gather HTTP information.- Parameters:
url
- The URL from which to read the information- Returns:
- a
Promise
of a JsonValue.
-
jwkSet
Deprecated.UsejwkSetAsync(URL)
instead.Provides a jwks set as indicated by the JWKSet's URL.- Parameters:
url
- The URL from which to gather the JWKSet- Returns:
- a jwks set valid for the provider associated with this URL
- Throws:
FailedToLoadJWKException
- If there are problems connecting to or parsing the response
-
jwkSetAsync
Provides a JWK set as indicated by the JWKSet's URL. -
jwkSetToMap
Converts a supplied JWKSet into a map of key:values, where the keys are the keyIds and the values are verification keys.- Parameters:
jwkSet
- The JWKSet to convert- Returns:
- A map of key ids to their respective keys
- Throws:
FailedToLoadJWKException
- If there are issues parsing the JWKSet's contents
-
jwkSetAsync(URL)
instead.