Class JwtEncoderParameters
- java.lang.Object
-
- org.springframework.security.oauth2.jwt.JwtEncoderParameters
-
public final class JwtEncoderParameters extends java.lang.Object
A holder of parameters containing the JWS headers and JWT Claims Set.- Since:
- 5.6
- See Also:
JwsHeader
,JwtClaimsSet
,JwtEncoder
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JwtEncoderParameters
from(JwsHeader jwsHeader, JwtClaimsSet claims)
static JwtEncoderParameters
from(JwtClaimsSet claims)
Returns a newJwtEncoderParameters
, initialized with the providedJwtClaimsSet
.JwtClaimsSet
getClaims()
Returns theclaims
.JwsHeader
getJwsHeader()
Returns theJWS headers
.
-
-
-
Method Detail
-
from
public static JwtEncoderParameters from(JwtClaimsSet claims)
Returns a newJwtEncoderParameters
, initialized with the providedJwtClaimsSet
.- Parameters:
claims
- theJwtClaimsSet
- Returns:
- the
JwtEncoderParameters
-
from
public static JwtEncoderParameters from(JwsHeader jwsHeader, JwtClaimsSet claims)
- Parameters:
jwsHeader
- theJwsHeader
claims
- theJwtClaimsSet
- Returns:
- the
JwtEncoderParameters
-
getJwsHeader
@Nullable public JwsHeader getJwsHeader()
Returns theJWS headers
.- Returns:
- the
JwsHeader
, ornull
if not specified
-
getClaims
public JwtClaimsSet getClaims()
Returns theclaims
.- Returns:
- the
JwtClaimsSet
-
-