Package io.fusionauth.jwks
Class JSONWebKeySetHelper
java.lang.Object
io.fusionauth.http.AbstractHttpHelper
io.fusionauth.jwks.JSONWebKeySetHelper
- Author:
- Daniel DeGroff
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<JSONWebKey>retrieveKeysFromIssuer(String issuer) Retrieve a list of JSON Web Keys from the JWK endpoint using the OIDC issuer as a starting point.static List<JSONWebKey>retrieveKeysFromIssuer(String issuer, java.util.function.Consumer<HttpURLConnection> consumer) Retrieve a list of JSON Web Keys from the JWK endpoint using the OIDC issuer as a starting point.static List<JSONWebKey>retrieveKeysFromJWKS(String endpoint) Retrieve JSON Web Keys from a JSON Web Key Set (JWKS) endpoint.static List<JSONWebKey>retrieveKeysFromJWKS(String endpoint, java.util.function.Consumer<HttpURLConnection> consumer) Retrieve JSON Web Keys from a JSON Web Key Set (JWKS) endpoint.static List<JSONWebKey>retrieveKeysFromJWKS(HttpURLConnection httpURLConnection) Retrieve JSON Web Keys from a JSON Web Key Set (JWKS) endpoint.static List<JSONWebKey>retrieveKeysFromWellKnownConfiguration(String endpoint) Retrieve JSON Web Keys from an OpenID Connect well known discovery endpoint.static List<JSONWebKey>retrieveKeysFromWellKnownConfiguration(String endpoint, java.util.function.Consumer<HttpURLConnection> consumer) Retrieve JSON Web Keys from an OpenID Connect well known discovery endpoint.static List<JSONWebKey>retrieveKeysFromWellKnownConfiguration(HttpURLConnection httpURLConnection) Retrieve JSON Web Keys from an OpenID Connect well known discovery endpoint.Methods inherited from class io.fusionauth.http.AbstractHttpHelper
buildURLConnection, get
-
Constructor Details
-
JSONWebKeySetHelper
public JSONWebKeySetHelper()
-
-
Method Details
-
retrieveKeysFromIssuer
Retrieve a list of JSON Web Keys from the JWK endpoint using the OIDC issuer as a starting point.- Parameters:
issuer- the OIDC issuer used to resolve the OpenID Connect discovery document which will be used to resolve the JWKS endpoint.- Returns:
- a list of keys or an empty set if no keys were found at the endpoint.
-
retrieveKeysFromIssuer
public static List<JSONWebKey> retrieveKeysFromIssuer(String issuer, java.util.function.Consumer<HttpURLConnection> consumer) Retrieve a list of JSON Web Keys from the JWK endpoint using the OIDC issuer as a starting point.- Parameters:
issuer- the OIDC issuer used to resolve the OpenID Connect discovery document which will be used to resolve the JWKS endpoint.consumer- an optional consumer to modify the HTTP URL Connection before making the request.- Returns:
- a list of keys or an empty set if no keys were found at the endpoint.
-
retrieveKeysFromWellKnownConfiguration
public static List<JSONWebKey> retrieveKeysFromWellKnownConfiguration(HttpURLConnection httpURLConnection) Retrieve JSON Web Keys from an OpenID Connect well known discovery endpoint. Use this method if you want to resolve the JWKS endpoint from the OpenID Connect discovery document and you want to build your own HTTP URL Connection.- Parameters:
httpURLConnection- the HTTP URL Connection that will be used to connect to the discovery endpoint used to resolve the JWKS endpoint.- Returns:
- a list of JSON Web Keys
-
retrieveKeysFromWellKnownConfiguration
Retrieve JSON Web Keys from an OpenID Connect well known discovery endpoint. Use this method if you want to resolve the JWKS endpoint from the OpenID Connect discovery document.- Parameters:
endpoint- the OpenID Connect well known discovery endpoint used to resolve the JWKS endpoint.- Returns:
- a list of JSON Web Keys
-
retrieveKeysFromWellKnownConfiguration
public static List<JSONWebKey> retrieveKeysFromWellKnownConfiguration(String endpoint, java.util.function.Consumer<HttpURLConnection> consumer) Retrieve JSON Web Keys from an OpenID Connect well known discovery endpoint. Use this method if you want to resolve the JWKS endpoint from the OpenID Connect discovery document.- Parameters:
endpoint- the OpenID Connect well known discovery endpoint used to resolve the JWKS endpoint.consumer- an optional consumer to modify the HTTP URL Connection before making the request.- Returns:
- a list of JSON Web Keys
-
retrieveKeysFromJWKS
Retrieve JSON Web Keys from a JSON Web Key Set (JWKS) endpoint. Use this method if you know the specific JWKS URL.- Parameters:
endpoint- the JWKS endpoint.- Returns:
- a list of JSON Web Keys
-
retrieveKeysFromJWKS
public static List<JSONWebKey> retrieveKeysFromJWKS(String endpoint, java.util.function.Consumer<HttpURLConnection> consumer) Retrieve JSON Web Keys from a JSON Web Key Set (JWKS) endpoint. Use this method if you know the specific JWKS URL.- Parameters:
endpoint- the JWKS endpoint.consumer- an optional consumer to modify the HTTP URL Connection before making the request.- Returns:
- a list of JSON Web Keys
-
retrieveKeysFromJWKS
Retrieve JSON Web Keys from a JSON Web Key Set (JWKS) endpoint. Use this method if you know the specific JWKS URL and you want to build your own HTTP URL Connection.- Parameters:
httpURLConnection- the URL connection that will be used to connect to the JWKS endpoint.- Returns:
- a list of JSON Web Keys
-