public class DefaultClaims extends JwtMap implements Claims
AUDIENCE, DESCRIPTION, EXPIRATION, ID, ISSUED_AT, ISSUER, NOT_BEFORE, SUBJECT| 构造器和说明 |
|---|
DefaultClaims() |
DefaultClaims(java.util.Map<java.lang.String,java.lang.Object> map) |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
get(java.lang.String claimName,
java.lang.Class<T> requiredType) |
java.lang.String |
getAudience()
Returns the JWT
aud (audience) value or null if not present. |
java.lang.String |
getDescription() |
java.util.Date |
getExpiration()
Returns the JWT
exp (expiration) timestamp or null if not present. |
java.lang.String |
getId()
Returns the JWTs
jti (JWT ID) value or null if not present. |
java.util.Date |
getIssuedAt()
Returns the JWT
iat (issued at) timestamp or null if not present. |
java.lang.String |
getIssuer()
Returns the JWT
iss (issuer) value or null if not present. |
java.util.Date |
getNotBefore()
Returns the JWT
nbf (not before) timestamp or null if not present. |
java.lang.String |
getSubject()
Returns the JWT
sub (subject) value or null if not present. |
Claims |
setAudience(java.lang.String aud)
Sets the JWT
aud (audience) value. |
Claims |
setDescription(java.lang.String description) |
Claims |
setExpiration(java.util.Date exp)
Sets the JWT
exp (expiration) timestamp. |
Claims |
setId(java.lang.String jti)
Sets the JWT
jti (JWT ID) value. |
Claims |
setIssuedAt(java.util.Date iat)
Sets the JWT
iat (issued at) timestamp. |
Claims |
setIssuer(java.lang.String iss)
Sets the JWT
iss (issuer) value. |
Claims |
setNotBefore(java.util.Date nbf)
Sets the JWT
nbf (not before) timestamp. |
Claims |
setSubject(java.lang.String sub)
Sets the JWT
sub (subject) value. |
public DefaultClaims()
public DefaultClaims(java.util.Map<java.lang.String,java.lang.Object> map)
public java.lang.String getIssuer()
Claimsiss (issuer) value or null if not present.public Claims setIssuer(java.lang.String iss)
Claimsiss (issuer) value. A null value will remove the property from the JSON map.setIssuer 在接口中 ClaimssetIssuer 在接口中 ClaimsMutator<Claims>iss - the JWT iss value or null to remove the property from the JSON map.Claims instance for method chaining.public java.lang.String getSubject()
Claimssub (subject) value or null if not present.getSubject 在接口中 Claimssub value or null if not present.public Claims setSubject(java.lang.String sub)
Claimssub (subject) value. A null value will remove the property from the JSON map.setSubject 在接口中 ClaimssetSubject 在接口中 ClaimsMutator<Claims>sub - the JWT sub value or null to remove the property from the JSON map.Claims instance for method chaining.public java.lang.String getAudience()
Claimsaud (audience) value or null if not present.getAudience 在接口中 Claimsaud value or null if not present.public Claims setAudience(java.lang.String aud)
Claimsaud (audience) value. A null value will remove the property from the JSON map.setAudience 在接口中 ClaimssetAudience 在接口中 ClaimsMutator<Claims>aud - the JWT aud value or null to remove the property from the JSON map.Claims instance for method chaining.public java.util.Date getExpiration()
Claimsexp (expiration) timestamp or null if not present.
A JWT obtained after this timestamp should not be used.
getExpiration 在接口中 Claimsexp value or null if not present.public Claims setExpiration(java.util.Date exp)
Claimsexp (expiration) timestamp. A null value will remove the property from the JSON map.
A JWT obtained after this timestamp should not be used.
setExpiration 在接口中 ClaimssetExpiration 在接口中 ClaimsMutator<Claims>exp - the JWT exp value or null to remove the property from the JSON map.Claims instance for method chaining.public java.util.Date getNotBefore()
Claimsnbf (not before) timestamp or null if not present.
A JWT obtained before this timestamp should not be used.
getNotBefore 在接口中 Claimsnbf value or null if not present.public Claims setNotBefore(java.util.Date nbf)
Claimsnbf (not before) timestamp. A null value will remove the property from the JSON map.
A JWT obtained before this timestamp should not be used.
setNotBefore 在接口中 ClaimssetNotBefore 在接口中 ClaimsMutator<Claims>nbf - the JWT nbf value or null to remove the property from the JSON map.Claims instance for method chaining.public java.util.Date getIssuedAt()
Claimsiat (issued at) timestamp or null if not present.
If present, this value is the timestamp when the JWT was created.
getIssuedAt 在接口中 Claimsnbf value or null if not present.public Claims setIssuedAt(java.util.Date iat)
Claimsiat (issued at) timestamp. A null value will remove the property from the JSON map.
The value is the timestamp when the JWT was created.
setIssuedAt 在接口中 ClaimssetIssuedAt 在接口中 ClaimsMutator<Claims>iat - the JWT iat value or null to remove the property from the JSON map.Claims instance for method chaining.public java.lang.String getId()
Claimsjti (JWT ID) value or null if not present.
This value is a CaSe-SenSiTiVe unique identifier for the JWT. If available, this value is expected to be assigned in a manner that ensures that there is a negligible probability that the same value will be accidentally assigned to a different data object. The ID can be used to prevent the JWT from being replayed.
public Claims setId(java.lang.String jti)
Claimsjti (JWT ID) value. A null value will remove the property from the JSON map.
This value is a CaSe-SenSiTiVe unique identifier for the JWT. If specified, this value MUST be assigned in a manner that ensures that there is a negligible probability that the same value will be accidentally assigned to a different data object. The ID can be used to prevent the JWT from being replayed.
setId 在接口中 ClaimssetId 在接口中 ClaimsMutator<Claims>jti - the JWT jti value or null to remove the property from the JSON map.Claims instance for method chaining.public java.lang.String getDescription()
getDescription 在接口中 Claimspublic Claims setDescription(java.lang.String description)
setDescription 在接口中 ClaimssetDescription 在接口中 ClaimsMutator<Claims>