Class JwtClaimsSet
- java.lang.Object
-
- org.springframework.security.oauth2.jwt.JwtClaimsSet
-
- All Implemented Interfaces:
ClaimAccessor
,JwtClaimAccessor
public final class JwtClaimsSet extends java.lang.Object implements JwtClaimAccessor
TheJWT
Claims Set is a JSON object representing the claims conveyed by a JSON Web Token.- Since:
- 5.6
- See Also:
Jwt
,JwtClaimAccessor
, JWT Claims Set
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JwtClaimsSet.Builder
A builder forJwtClaimsSet
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JwtClaimsSet.Builder
builder()
Returns a newJwtClaimsSet.Builder
.static JwtClaimsSet.Builder
from(JwtClaimsSet claims)
Returns a newJwtClaimsSet.Builder
, initialized with the providedclaims
.java.util.Map<java.lang.String,java.lang.Object>
getClaims()
Returns a set of claims that may be used for assertions.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.security.oauth2.core.ClaimAccessor
containsClaim, getClaim, getClaimAsBoolean, getClaimAsInstant, getClaimAsMap, getClaimAsString, getClaimAsStringList, getClaimAsURL, hasClaim
-
Methods inherited from interface org.springframework.security.oauth2.jwt.JwtClaimAccessor
getAudience, getExpiresAt, getId, getIssuedAt, getIssuer, getNotBefore, getSubject
-
-
-
-
Method Detail
-
getClaims
public java.util.Map<java.lang.String,java.lang.Object> getClaims()
Description copied from interface:ClaimAccessor
Returns a set of claims that may be used for assertions.- Specified by:
getClaims
in interfaceClaimAccessor
- Returns:
- a
Map
of claims
-
builder
public static JwtClaimsSet.Builder builder()
Returns a newJwtClaimsSet.Builder
.- Returns:
- the
JwtClaimsSet.Builder
-
from
public static JwtClaimsSet.Builder from(JwtClaimsSet claims)
Returns a newJwtClaimsSet.Builder
, initialized with the providedclaims
.- Parameters:
claims
- a JWT claims set- Returns:
- the
JwtClaimsSet.Builder
-
-