@Beta public static class GoogleIdToken.Payload extends IdToken.Payload
Beta GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Payload() |
| Modifier and Type | Method and Description |
|---|---|
GoogleIdToken.Payload |
clone() |
String |
getEmail()
Returns the e-mail address of the user or
null if it was not requested. |
Boolean |
getEmailVerified()
Returns
true if the users e-mail address has been verified by Google. |
String |
getHostedDomain()
Returns the hosted domain name if asserted user is a domain managed user or
null for
none. |
String |
getIssuee()
Deprecated.
(scheduled to be removed in 1.18) Use
IdToken.Payload.getAuthorizedParty() instead. |
String |
getUserId()
Deprecated.
(scheduled to be removed in 1.18) Use
JsonWebToken.Payload.getSubject() instead. |
GoogleIdToken.Payload |
set(String fieldName,
Object value) |
GoogleIdToken.Payload |
setAccessTokenHash(String accessTokenHash) |
GoogleIdToken.Payload |
setAudience(Object audience) |
GoogleIdToken.Payload |
setAuthorizationTimeSeconds(Long authorizationTimeSeconds) |
GoogleIdToken.Payload |
setAuthorizedParty(String authorizedParty) |
GoogleIdToken.Payload |
setClassReference(String classReference) |
GoogleIdToken.Payload |
setEmail(String email)
Sets the e-mail address of the user or
null if it was not requested. |
GoogleIdToken.Payload |
setEmailVerified(Boolean emailVerified)
Sets whether the users e-mail address has been verified by Google or not.
|
GoogleIdToken.Payload |
setExpirationTimeSeconds(Long expirationTimeSeconds) |
GoogleIdToken.Payload |
setHostedDomain(String hostedDomain)
Sets the hosted domain name if asserted user is a domain managed user or
null for
none. |
GoogleIdToken.Payload |
setIssuedAtTimeSeconds(Long issuedAtTimeSeconds) |
GoogleIdToken.Payload |
setIssuee(String issuee)
Deprecated.
(scheduled to be removed in 1.18) Use
setAuthorizedParty(String)
instead. |
GoogleIdToken.Payload |
setIssuer(String issuer) |
GoogleIdToken.Payload |
setJwtId(String jwtId) |
GoogleIdToken.Payload |
setMethodsReferences(List<String> methodsReferences) |
GoogleIdToken.Payload |
setNonce(String nonce) |
GoogleIdToken.Payload |
setNotBeforeTimeSeconds(Long notBeforeTimeSeconds) |
GoogleIdToken.Payload |
setSubject(String subject) |
GoogleIdToken.Payload |
setType(String type) |
GoogleIdToken.Payload |
setUserId(String userId)
Deprecated.
(scheduled to be removed in 1.18) Use
setSubject(String) instead. |
getAccessTokenHash, getAuthorizationTimeSeconds, getAuthorizedParty, getClassReference, getMethodsReferences, getNoncegetAudience, getAudienceAsList, getExpirationTimeSeconds, getIssuedAtTimeSeconds, getIssuer, getJwtId, getNotBeforeTimeSeconds, getSubject, getTypegetFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll@Deprecated public String getUserId()
JsonWebToken.Payload.getSubject() instead.null for none.@Deprecated public GoogleIdToken.Payload setUserId(String userId)
setSubject(String) instead.null for none.@Deprecated public String getIssuee()
IdToken.Payload.getAuthorizedParty() instead.null for none.@Deprecated public GoogleIdToken.Payload setIssuee(String issuee)
setAuthorizedParty(String)
instead.null for none.public String getHostedDomain()
null for
none.public GoogleIdToken.Payload setHostedDomain(String hostedDomain)
null for
none.public String getEmail()
null if it was not requested.
Requires the "https://www.googleapis.com/auth/userinfo.email" scope.
public GoogleIdToken.Payload setEmail(String email)
null if it was not requested.
Used in conjunction with the "https://www.googleapis.com/auth/userinfo.email"
scope.
public Boolean getEmailVerified()
true if the users e-mail address has been verified by Google.
Requires the "https://www.googleapis.com/auth/userinfo.email" scope.
Upgrade warning: in prior version 1.16 this method accessed "verified_email"
and returns a boolean, but starting with verison 1.17, it now accesses "email_verified" and returns a Boolean. Previously, if this value was not specified,
this method would return false, but now it returns null.
public GoogleIdToken.Payload setEmailVerified(Boolean emailVerified)
Used in conjunction with the "https://www.googleapis.com/auth/userinfo.email"
scope.
Upgrade warning: in prior version 1.16 this method accessed "verified_email"
and required a boolean parameter, but starting with verison 1.17, it now accesses "email_verified" and requires a Boolean parameter.
public GoogleIdToken.Payload setAuthorizationTimeSeconds(Long authorizationTimeSeconds)
setAuthorizationTimeSeconds in class IdToken.Payloadpublic GoogleIdToken.Payload setAuthorizedParty(String authorizedParty)
setAuthorizedParty in class IdToken.Payloadpublic GoogleIdToken.Payload setNonce(String nonce)
setNonce in class IdToken.Payloadpublic GoogleIdToken.Payload setAccessTokenHash(String accessTokenHash)
setAccessTokenHash in class IdToken.Payloadpublic GoogleIdToken.Payload setClassReference(String classReference)
setClassReference in class IdToken.Payloadpublic GoogleIdToken.Payload setMethodsReferences(List<String> methodsReferences)
setMethodsReferences in class IdToken.Payloadpublic GoogleIdToken.Payload setExpirationTimeSeconds(Long expirationTimeSeconds)
setExpirationTimeSeconds in class IdToken.Payloadpublic GoogleIdToken.Payload setNotBeforeTimeSeconds(Long notBeforeTimeSeconds)
setNotBeforeTimeSeconds in class IdToken.Payloadpublic GoogleIdToken.Payload setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)
setIssuedAtTimeSeconds in class IdToken.Payloadpublic GoogleIdToken.Payload setIssuer(String issuer)
setIssuer in class IdToken.Payloadpublic GoogleIdToken.Payload setAudience(Object audience)
setAudience in class IdToken.Payloadpublic GoogleIdToken.Payload setJwtId(String jwtId)
setJwtId in class IdToken.Payloadpublic GoogleIdToken.Payload setType(String type)
setType in class IdToken.Payloadpublic GoogleIdToken.Payload setSubject(String subject)
setSubject in class IdToken.Payloadpublic GoogleIdToken.Payload set(String fieldName, Object value)
set in class IdToken.Payloadpublic GoogleIdToken.Payload clone()
clone in class IdToken.PayloadCopyright © 2010–2022 Google. All rights reserved.