Package io.jans.as.model.jwt
Class JwtClaims
- java.lang.Object
-
- io.jans.as.model.jwt.JwtClaimSet
-
- io.jans.as.model.jwt.JwtClaims
-
public class JwtClaims extends JwtClaimSet
- Author:
- Javier Rojas Blum Date: 11.09.2012
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAudience(String audience)
void
setAudience(String audience)
Identifies the audience that the JWT is intended for.void
setAudience(URI audience)
Identifies the audience that the JWT is intended for.void
setExpirationTime(Date expirationTime)
Identifies the expiration time on or after which the token MUST NOT be accepted for processing.void
setIatNow()
void
setIssuedAt(Date issuedAt)
Identifies the time at which the JWT was issued.void
setIssuer(String issuer)
Identifies the principal that issued the JWT.void
setIssuer(URI issuer)
Identifies the principal that issued the JWT.void
setJwtId(String jwtId)
Provides a unique identifier for the JWT.void
setJwtId(UUID jwtId)
Provides a unique identifier for the JWT.void
setNotBefore(Date notBefore)
Identifies the time before which the token MUST NOT be accepted for processing.void
setSubjectIdentifier(String subjectIdentifier)
Identifies the subject of the JWT.void
setSubjectIdentifier(URI subjectIdentifier)
Identifies the subject of the JWT.void
setType(JwtType type)
Declare a type for the contents of this JWT Claims Set.-
Methods inherited from class io.jans.as.model.jwt.JwtClaimSet
getClaim, getClaimAsCharacter, getClaimAsDate, getClaimAsInteger, getClaimAsJSON, getClaimAsLong, getClaimAsString, getClaimAsStringList, hasClaim, keys, load, load, removeClaim, setClaim, setClaim, setClaim, setClaim, setClaim, setClaim, setClaim, setClaim, setClaim, setClaim, setClaimFromJsonObject, setClaimObject, setNullClaim, toBase64JsonObject, toJsonObject, toJsonString, toMap
-
-
-
-
Constructor Detail
-
JwtClaims
public JwtClaims()
-
JwtClaims
public JwtClaims(org.json.JSONObject jsonObject)
-
JwtClaims
public JwtClaims(String base64JsonObject) throws InvalidJwtException
- Throws:
InvalidJwtException
-
-
Method Detail
-
setExpirationTime
public void setExpirationTime(Date expirationTime)
Identifies the expiration time on or after which the token MUST NOT be accepted for processing.- Parameters:
expirationTime
- The expiration time.
-
setNotBefore
public void setNotBefore(Date notBefore)
Identifies the time before which the token MUST NOT be accepted for processing. The processing of the "nbf" claim requires that the current date/time MUST be after or equal to the not-before date/time listed in the "nbf" claim.- Parameters:
notBefore
- The not-before date.
-
setIssuedAt
public void setIssuedAt(Date issuedAt)
Identifies the time at which the JWT was issued. This claim can be used to determine the age of the token.- Parameters:
issuedAt
- The issue date.
-
setIatNow
public void setIatNow()
-
setIssuer
public void setIssuer(String issuer)
Identifies the principal that issued the JWT.- Parameters:
issuer
- The issuer of the JWT.
-
setIssuer
public void setIssuer(URI issuer)
Identifies the principal that issued the JWT.- Parameters:
issuer
- The issuer of the JWT.
-
addAudience
public void addAudience(String audience)
-
setAudience
public void setAudience(String audience)
Identifies the audience that the JWT is intended for. The principal intended to process the JWT MUST be identified with the value of the audience claim. If the principal processing the claim does not identify itself with the identifier in the "aud" claim value then the JWT MUST be rejected.- Parameters:
audience
- The audience of the JWT.
-
setAudience
public void setAudience(URI audience)
Identifies the audience that the JWT is intended for. The principal intended to process the JWT MUST be identified with the value of the audience claim. If the principal processing the claim does not identify itself with the identifier in the "aud" claim value then the JWT MUST be rejected.- Parameters:
audience
- The audience of the JWT.
-
setSubjectIdentifier
public void setSubjectIdentifier(String subjectIdentifier)
Identifies the subject of the JWT.- Parameters:
subjectIdentifier
- The subject of the JWT.
-
setSubjectIdentifier
public void setSubjectIdentifier(URI subjectIdentifier)
Identifies the subject of the JWT.- Parameters:
subjectIdentifier
- The subject of the JWT.
-
setJwtId
public void setJwtId(String jwtId)
Provides a unique identifier for the JWT.- Parameters:
jwtId
- Unique identifier for the JWT.
-
setJwtId
public void setJwtId(UUID jwtId)
Provides a unique identifier for the JWT.- Parameters:
jwtId
- Unique identifier for the JWT.
-
setType
public void setType(JwtType type)
Declare a type for the contents of this JWT Claims Set.- Parameters:
type
- The type of the JWT claims set.
-
-