Class GoogleIdToken.Payload (1.35.2)

public static class GoogleIdToken.Payload extends IdToken.Payload

Beta
Google ID token payload.

Inheritance

Object > java.util.AbstractMap > com.google.api.client.util.GenericData > com.google.api.client.json.GenericJson > JsonWebToken.Payload > com.google.api.client.auth.openidconnect.IdToken.Payload > GoogleIdToken.Payload

Constructors

Payload()

public Payload()

Methods

clone()

public GoogleIdToken.Payload clone()
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.clone()

getEmail()

public String getEmail()

Returns the e-mail address of the user or null if it was not requested.

Requires the "https://www.googleapis.com/auth/userinfo.email" scope.

Returns
TypeDescription
String

getEmailVerified()

public Boolean getEmailVerified()

Returns true if the users e-mail address has been verified by Google.

Requires the "https://www.googleapis.com/auth/userinfo.email" scope.

Returns
TypeDescription
Boolean

getHostedDomain()

public String getHostedDomain()

Returns the hosted domain name if asserted user is a domain managed user or null for none.

Returns
TypeDescription
String

getIssuee() (deprecated)

public String getIssuee()

Deprecated. (scheduled to be removed in 1.18) Use #getAuthorizedParty() instead.

Returns the client ID of issuee or null for none.

Returns
TypeDescription
String

getUserId() (deprecated)

public String getUserId()

Deprecated. (scheduled to be removed in 1.18) Use #getSubject() instead.

Returns the obfuscated Google user id or null for none.

Returns
TypeDescription
String

set(String fieldName, Object value)

public GoogleIdToken.Payload set(String fieldName, Object value)
Parameters
NameDescription
fieldNameString
valueObject
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.set(java.lang.String,java.lang.Object)

setAccessTokenHash(String accessTokenHash)

public GoogleIdToken.Payload setAccessTokenHash(String accessTokenHash)
Parameter
NameDescription
accessTokenHashString
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setAccessTokenHash(java.lang.String)

setAudience(Object audience)

public GoogleIdToken.Payload setAudience(Object audience)
Parameter
NameDescription
audienceObject
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setAudience(java.lang.Object)

setAuthorizationTimeSeconds(Long authorizationTimeSeconds)

public GoogleIdToken.Payload setAuthorizationTimeSeconds(Long authorizationTimeSeconds)
Parameter
NameDescription
authorizationTimeSecondsLong
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setAuthorizationTimeSeconds(java.lang.Long)

setAuthorizedParty(String authorizedParty)

public GoogleIdToken.Payload setAuthorizedParty(String authorizedParty)
Parameter
NameDescription
authorizedPartyString
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setAuthorizedParty(java.lang.String)

setClassReference(String classReference)

public GoogleIdToken.Payload setClassReference(String classReference)
Parameter
NameDescription
classReferenceString
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setClassReference(java.lang.String)

setEmail(String email)

public GoogleIdToken.Payload setEmail(String email)

Sets the e-mail address of the user or null if it was not requested.

Used in conjunction with the "https://www.googleapis.com/auth/userinfo.email" scope.

Parameter
NameDescription
emailString
Returns
TypeDescription
GoogleIdToken.Payload

setEmailVerified(Boolean emailVerified)

public GoogleIdToken.Payload setEmailVerified(Boolean emailVerified)

Sets whether the users e-mail address has been verified by Google or not.

Used in conjunction with the "https://www.googleapis.com/auth/userinfo.email" scope.

Parameter
NameDescription
emailVerifiedBoolean
Returns
TypeDescription
GoogleIdToken.Payload

setExpirationTimeSeconds(Long expirationTimeSeconds)

public GoogleIdToken.Payload setExpirationTimeSeconds(Long expirationTimeSeconds)
Parameter
NameDescription
expirationTimeSecondsLong
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setExpirationTimeSeconds(java.lang.Long)

setHostedDomain(String hostedDomain)

public GoogleIdToken.Payload setHostedDomain(String hostedDomain)

Sets the hosted domain name if asserted user is a domain managed user or null for none.

Parameter
NameDescription
hostedDomainString
Returns
TypeDescription
GoogleIdToken.Payload

setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)

public GoogleIdToken.Payload setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)
Parameter
NameDescription
issuedAtTimeSecondsLong
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setIssuedAtTimeSeconds(java.lang.Long)

setIssuee(String issuee) (deprecated)

public GoogleIdToken.Payload setIssuee(String issuee)

Deprecated. (scheduled to be removed in 1.18) Use #setAuthorizedParty(String) instead.

Sets the client ID of issuee or null for none.

Parameter
NameDescription
issueeString
Returns
TypeDescription
GoogleIdToken.Payload

setIssuer(String issuer)

public GoogleIdToken.Payload setIssuer(String issuer)
Parameter
NameDescription
issuerString
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setIssuer(java.lang.String)

setJwtId(String jwtId)

public GoogleIdToken.Payload setJwtId(String jwtId)
Parameter
NameDescription
jwtIdString
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setJwtId(java.lang.String)

setMethodsReferences(List<String> methodsReferences)

public GoogleIdToken.Payload setMethodsReferences(List<String> methodsReferences)
Parameter
NameDescription
methodsReferencesList<String>
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setMethodsReferences(java.util.List<java.lang.String>)

setNonce(String nonce)

public GoogleIdToken.Payload setNonce(String nonce)
Parameter
NameDescription
nonceString
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setNonce(java.lang.String)

setNotBeforeTimeSeconds(Long notBeforeTimeSeconds)

public GoogleIdToken.Payload setNotBeforeTimeSeconds(Long notBeforeTimeSeconds)
Parameter
NameDescription
notBeforeTimeSecondsLong
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setNotBeforeTimeSeconds(java.lang.Long)

setSubject(String subject)

public GoogleIdToken.Payload setSubject(String subject)
Parameter
NameDescription
subjectString
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setSubject(java.lang.String)

setType(String type)

public GoogleIdToken.Payload setType(String type)
Parameter
NameDescription
typeString
Returns
TypeDescription
GoogleIdToken.Payload
Overrides
com.google.api.client.auth.openidconnect.IdToken.Payload.setType(java.lang.String)

setUserId(String userId) (deprecated)

public GoogleIdToken.Payload setUserId(String userId)

Deprecated. (scheduled to be removed in 1.18) Use #setSubject(String) instead.

Sets the obfuscated Google user id or null for none.

Parameter
NameDescription
userIdString
Returns
TypeDescription
GoogleIdToken.Payload