Class JsonWebToken.Payload
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.client.json.webtoken.JsonWebToken.Payload
-
- Enclosing class:
- JsonWebToken
public static class JsonWebToken.Payload extends GenericJson
Payload as specified in Reserved Claim Names.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description Payload()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonWebToken.Payload
clone()
Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.Object
getAudience()
Returns the audience claim that identifies the audience that the JWT is intended for (should either be aString
or aList<String>
) ornull
for none.List<String>
getAudienceAsList()
Returns the list of audience claim that identifies the audience that the JWT is intended for or empty for none.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 ornull
for none.Long
getIssuedAtTimeSeconds()
Returns the issued at claim that identifies the time (in seconds) at which the JWT was issued ornull
for none.String
getIssuer()
Returns the issuer claim that identifies the principal that issued the JWT ornull
for none.String
getJwtId()
Returns the JWT ID claim that provides a unique identifier for the JWT ornull
for none.Long
getNotBeforeTimeSeconds()
Returns the not before claim that identifies the time (in seconds) before which the token MUST NOT be accepted for processing ornull
for none.String
getSubject()
Returns the subject claim identifying the principal that is the subject of the JWT ornull
for none.String
getType()
Returns the type claim that is used to declare a type for the contents of this JWT Claims Set ornull
for none.JsonWebToken.Payload
set(String fieldName, Object value)
Sets the given field value (may benull
) for the given field name.JsonWebToken.Payload
setAudience(Object audience)
Sets the audience claim that identifies the audience that the JWT is intended for (should either be aString
or aList<String>
) ornull
for none.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 ornull
for none.JsonWebToken.Payload
setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)
Sets the issued at claim that identifies the time (in seconds) at which the JWT was issued ornull
for none.JsonWebToken.Payload
setIssuer(String issuer)
Sets the issuer claim that identifies the principal that issued the JWT ornull
for none.JsonWebToken.Payload
setJwtId(String jwtId)
Sets the JWT ID claim that provides a unique identifier for the JWT ornull
for none.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 ornull
for none.JsonWebToken.Payload
setSubject(String subject)
Sets the subject claim identifying the principal that is the subject of the JWT ornull
for none.JsonWebToken.Payload
setType(String type)
Sets the type claim that is used to declare a type for the contents of this JWT Claims Set ornull
for none.-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
-
-
-
-
Method Detail
-
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 ornull
for none.
-
setExpirationTimeSeconds
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 ornull
for none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
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 ornull
for none.
-
setNotBeforeTimeSeconds
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 ornull
for none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getIssuedAtTimeSeconds
public final Long getIssuedAtTimeSeconds()
Returns the issued at claim that identifies the time (in seconds) at which the JWT was issued ornull
for none.
-
setIssuedAtTimeSeconds
public JsonWebToken.Payload setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)
Sets the issued at claim that identifies the time (in seconds) at which the JWT was issued ornull
for none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getIssuer
public final String getIssuer()
Returns the issuer claim that identifies the principal that issued the JWT ornull
for none.
-
setIssuer
public JsonWebToken.Payload setIssuer(String issuer)
Sets the issuer claim that identifies the principal that issued the JWT ornull
for none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getAudience
public final Object getAudience()
Returns the audience claim that identifies the audience that the JWT is intended for (should either be aString
or aList<String>
) ornull
for none.
-
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.
-
setAudience
public JsonWebToken.Payload setAudience(Object audience)
Sets the audience claim that identifies the audience that the JWT is intended for (should either be aString
or aList<String>
) ornull
for none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getJwtId
public final String getJwtId()
Returns the JWT ID claim that provides a unique identifier for the JWT ornull
for none.
-
setJwtId
public JsonWebToken.Payload setJwtId(String jwtId)
Sets the JWT ID claim that provides a unique identifier for the JWT ornull
for none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getType
public final String getType()
Returns the type claim that is used to declare a type for the contents of this JWT Claims Set ornull
for none.
-
setType
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 ornull
for none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getSubject
public final String getSubject()
Returns the subject claim identifying the principal that is the subject of the JWT ornull
for none.
-
setSubject
public JsonWebToken.Payload setSubject(String subject)
Sets the subject claim identifying the principal that is the subject of the JWT ornull
for none.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
set
public JsonWebToken.Payload set(String fieldName, Object value)
Description copied from class:GenericData
Sets the given field value (may benull
) for the given field name. Any existing value for the field will be overwritten. It may be more slightly more efficient thanGenericData.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.
- Overrides:
set
in classGenericJson
-
clone
public JsonWebToken.Payload clone()
Description copied from class:GenericData
Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.- Overrides:
clone
in classGenericJson
-
-