Package io.jans.as.model.jwt
Class JwtClaims
java.lang.Object
io.jans.as.model.jwt.JwtClaimSet
io.jans.as.model.jwt.JwtClaims
- Author:
- Javier Rojas Blum Date: 11.09.2012
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAudience(String audience) voidsetAudience(String audience) Identifies the audience that the JWT is intended for.voidsetAudience(URI audience) Identifies the audience that the JWT is intended for.voidsetExpirationTime(Date expirationTime) Identifies the expiration time on or after which the token MUST NOT be accepted for processing.voidvoidvoidsetIssuedAt(Date issuedAt) Identifies the time at which the JWT was issued.voidIdentifies the principal that issued the JWT.voidIdentifies the principal that issued the JWT.voidProvides a unique identifier for the JWT.voidProvides a unique identifier for the JWT.voidvoidsetNotBefore(Date notBefore) Identifies the time before which the token MUST NOT be accepted for processing.voidsetSubjectIdentifier(String subjectIdentifier) Identifies the subject of the JWT.voidsetSubjectIdentifier(URI subjectIdentifier) Identifies the subject of the JWT.voidDeclare 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 Details
-
JwtClaims
public JwtClaims() -
JwtClaims
public JwtClaims(org.json.JSONObject jsonObject) -
JwtClaims
- Throws:
InvalidJwtException
-
-
Method Details
-
setExpirationTime
Identifies the expiration time on or after which the token MUST NOT be accepted for processing.- Parameters:
expirationTime- The expiration time.
-
setNotBefore
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.
-
setNbf
-
setIssuedAt
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() -
setIat
-
setIssuer
Identifies the principal that issued the JWT.- Parameters:
issuer- The issuer of the JWT.
-
setIssuer
Identifies the principal that issued the JWT.- Parameters:
issuer- The issuer of the JWT.
-
addAudience
-
setAudience
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
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
Identifies the subject of the JWT.- Parameters:
subjectIdentifier- The subject of the JWT.
-
setSubjectIdentifier
Identifies the subject of the JWT.- Parameters:
subjectIdentifier- The subject of the JWT.
-
setJwtId
Provides a unique identifier for the JWT.- Parameters:
jwtId- Unique identifier for the JWT.
-
setJwtId
Provides a unique identifier for the JWT.- Parameters:
jwtId- Unique identifier for the JWT.
-
setType
Declare a type for the contents of this JWT Claims Set.- Parameters:
type- The type of the JWT claims set.
-