Class GoogleIdToken.Payload (2.4.1)

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
Type Description
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
Type Description
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
Type Description
Boolean

getHostedDomain()

public String getHostedDomain()

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

Returns
Type Description
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
Type Description
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
Type Description
String

set(String fieldName, Object value)

public GoogleIdToken.Payload set(String fieldName, Object value)
Parameters
Name Description
fieldName String
value Object
Returns
Type Description
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
Name Description
accessTokenHash String
Returns
Type Description
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
Name Description
audience Object
Returns
Type Description
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
Name Description
authorizationTimeSeconds Long
Returns
Type Description
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
Name Description
authorizedParty String
Returns
Type Description
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
Name Description
classReference String
Returns
Type Description
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
Name Description
email String
Returns
Type Description
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
Name Description
emailVerified Boolean
Returns
Type Description
GoogleIdToken.Payload

setExpirationTimeSeconds(Long expirationTimeSeconds)

public GoogleIdToken.Payload setExpirationTimeSeconds(Long expirationTimeSeconds)
Parameter
Name Description
expirationTimeSeconds Long
Returns
Type Description
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
Name Description
hostedDomain String
Returns
Type Description
GoogleIdToken.Payload

setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)

public GoogleIdToken.Payload setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)
Parameter
Name Description
issuedAtTimeSeconds Long
Returns
Type Description
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
Name Description
issuee String
Returns
Type Description
GoogleIdToken.Payload

setIssuer(String issuer)

public GoogleIdToken.Payload setIssuer(String issuer)
Parameter
Name Description
issuer String
Returns
Type Description
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
Name Description
jwtId String
Returns
Type Description
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
Name Description
methodsReferences List<String>
Returns
Type Description
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
Name Description
nonce String
Returns
Type Description
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
Name Description
notBeforeTimeSeconds Long
Returns
Type Description
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
Name Description
subject String
Returns
Type Description
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
Name Description
type String
Returns
Type Description
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
Name Description
userId String
Returns
Type Description
GoogleIdToken.Payload