public final class JwtDecoders
extends java.lang.Object
JwtDecoder
from an OpenID
Provider Configuration or
Authorization Server Metadata
Request based on provided issuer and method invoked.Modifier and Type | Method and Description |
---|---|
static <T extends JwtDecoder> |
fromIssuerLocation(java.lang.String issuer)
Creates a
JwtDecoder using the provided Issuer
by querying three different discovery endpoints serially, using the values in the
first successful response to initialize. |
static <T extends JwtDecoder> |
fromOidcIssuerLocation(java.lang.String oidcIssuerLocation)
Creates a
JwtDecoder using the provided Issuer
by making an OpenID
Provider Configuration Request and using the values in the OpenID
Provider Configuration Response to initialize the JwtDecoder . |
public static <T extends JwtDecoder> T fromOidcIssuerLocation(java.lang.String oidcIssuerLocation)
JwtDecoder
using the provided Issuer
by making an OpenID
Provider Configuration Request and using the values in the OpenID
Provider Configuration Response to initialize the JwtDecoder
.oidcIssuerLocation
- the IssuerJwtDecoder
that was initialized by the OpenID Provider
Configuration.public static <T extends JwtDecoder> T fromIssuerLocation(java.lang.String issuer)
JwtDecoder
using the provided Issuer
by querying three different discovery endpoints serially, using the values in the
first successful response to initialize. If an endpoint returns anything other than
a 200 or a 4xx, the method will exit without attempting subsequent endpoints.
The three endpoints are computed as follows, given that the issuer
is
composed of a host
and a path
:
host/.well-known/openid-configuration/path
, as defined in
RFC 8414's Compatibility
Notes.issuer/.well-known/openid-configuration
, as defined in
OpenID Provider Configuration.host/.well-known/oauth-authorization-server/path
, as defined in
Authorization Server
Metadata Request.fromOidcIssuerLocation(String)
issuer
- the IssuerJwtDecoder
that was initialized by one of the described endpoints