Class JsonWebToken.Payload (1.42.3)

public static class JsonWebToken.Payload extends GenericJson

Payload as specified in Reserved Claim Names.

Inheritance

Object > AbstractMap > GenericData > GenericJson > JsonWebToken.Payload

Constructors

Payload()

public Payload()

Methods

clone()

public JsonWebToken.Payload clone()

Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.

Returns
TypeDescription
JsonWebToken.Payload
Overrides

getAudience()

public final Object getAudience()

Returns the audience claim that identifies the audience that the JWT is intended for (should either be a String or a List<String>) or null for none.

Returns
TypeDescription
Object

getAudienceAsList()

public final List<String> getAudienceAsList()

Returns the list of audience claim that identifies the audience that the JWT is intended for or empty for none.

Returns
TypeDescription
List<String>

getExpirationTimeSeconds()

public final Long getExpirationTimeSeconds()

Returns the expiration time (in seconds) claim that identifies the expiration time on or after which the token MUST NOT be accepted for processing or null for none.

Returns
TypeDescription
Long

getIssuedAtTimeSeconds()

public final Long getIssuedAtTimeSeconds()

Returns the issued at claim that identifies the time (in seconds) at which the JWT was issued or null for none.

Returns
TypeDescription
Long

getIssuer()

public final String getIssuer()

Returns the issuer claim that identifies the principal that issued the JWT or null for none.

Returns
TypeDescription
String

getJwtId()

public final String getJwtId()

Returns the JWT ID claim that provides a unique identifier for the JWT or null for none.

Returns
TypeDescription
String

getNotBeforeTimeSeconds()

public final Long getNotBeforeTimeSeconds()

Returns the not before claim that identifies the time (in seconds) before which the token MUST NOT be accepted for processing or null for none.

Returns
TypeDescription
Long

getSubject()

public final String getSubject()

Returns the subject claim identifying the principal that is the subject of the JWT or null for none.

Returns
TypeDescription
String

getType()

public final String getType()

Returns the type claim that is used to declare a type for the contents of this JWT Claims Set or null for none.

Returns
TypeDescription
String

set(String fieldName, Object value)

public JsonWebToken.Payload set(String fieldName, Object value)

Sets the given field value (may be null) for the given field name. Any existing value for the field will be overwritten. It may be more slightly more efficient than #put(String, Object) because it avoids accessing the field's original value.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameters
NameDescription
fieldNameString
valueObject
Returns
TypeDescription
JsonWebToken.Payload
Overrides

setAudience(Object audience)

public JsonWebToken.Payload setAudience(Object audience)

Sets the audience claim that identifies the audience that the JWT is intended for (should either be a String or a List<String>) or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
audienceObject
Returns
TypeDescription
JsonWebToken.Payload

setExpirationTimeSeconds(Long expirationTimeSeconds)

public JsonWebToken.Payload setExpirationTimeSeconds(Long expirationTimeSeconds)

Sets the expiration time claim that identifies the expiration time (in seconds) on or after which the token MUST NOT be accepted for processing or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
expirationTimeSecondsLong
Returns
TypeDescription
JsonWebToken.Payload

setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)

public JsonWebToken.Payload setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)

Sets the issued at claim that identifies the time (in seconds) at which the JWT was issued or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
issuedAtTimeSecondsLong
Returns
TypeDescription
JsonWebToken.Payload

setIssuer(String issuer)

public JsonWebToken.Payload setIssuer(String issuer)

Sets the issuer claim that identifies the principal that issued the JWT or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
issuerString
Returns
TypeDescription
JsonWebToken.Payload

setJwtId(String jwtId)

public JsonWebToken.Payload setJwtId(String jwtId)

Sets the JWT ID claim that provides a unique identifier for the JWT or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
jwtIdString
Returns
TypeDescription
JsonWebToken.Payload

setNotBeforeTimeSeconds(Long notBeforeTimeSeconds)

public JsonWebToken.Payload setNotBeforeTimeSeconds(Long notBeforeTimeSeconds)

Sets the not before claim that identifies the time (in seconds) before which the token MUST NOT be accepted for processing or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
notBeforeTimeSecondsLong
Returns
TypeDescription
JsonWebToken.Payload

setSubject(String subject)

public JsonWebToken.Payload setSubject(String subject)

Sets the subject claim identifying the principal that is the subject of the JWT or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
subjectString
Returns
TypeDescription
JsonWebToken.Payload

setType(String type)

public JsonWebToken.Payload setType(String type)

Sets the type claim that is used to declare a type for the contents of this JWT Claims Set or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
typeString
Returns
TypeDescription
JsonWebToken.Payload