Class ReactiveJwtDecoders
- java.lang.Object
-
- org.springframework.security.oauth2.jwt.ReactiveJwtDecoders
-
public final class ReactiveJwtDecoders extends java.lang.Object
Allows creating aReactiveJwtDecoder
from an OpenID Provider Configuration or Authorization Server Metadata Request based on provided issuer and method invoked.- Since:
- 5.1
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReactiveJwtDecoder
fromIssuerLocation(java.lang.String issuer)
Creates aReactiveJwtDecoder
using the provided Issuer by querying three different discovery endpoints serially, using the values in the first successful response to initialize.static ReactiveJwtDecoder
fromOidcIssuerLocation(java.lang.String oidcIssuerLocation)
Creates aReactiveJwtDecoder
using the provided Issuer by making an OpenID Provider Configuration Request and using the values in the OpenID Provider Configuration Response to initialize theReactiveJwtDecoder
.
-
-
-
Method Detail
-
fromOidcIssuerLocation
public static ReactiveJwtDecoder fromOidcIssuerLocation(java.lang.String oidcIssuerLocation)
Creates aReactiveJwtDecoder
using the provided Issuer by making an OpenID Provider Configuration Request and using the values in the OpenID Provider Configuration Response to initialize theReactiveJwtDecoder
.- Parameters:
oidcIssuerLocation
- the Issuer- Returns:
- a
ReactiveJwtDecoder
that was initialized by the OpenID Provider Configuration.
-
fromIssuerLocation
public static ReactiveJwtDecoder fromIssuerLocation(java.lang.String issuer)
Creates aReactiveJwtDecoder
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 theissuer
is composed of ahost
and apath
: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)
- Parameters:
issuer
- the Issuer- Returns:
- a
ReactiveJwtDecoder
that was initialized by one of the described endpoints
-
-