@Beta public static class GoogleIdToken.Payload extends IdToken.Payload
Beta
GenericData.Flags
AbstractMap.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, getNonce
getAudience, getAudienceAsList, getExpirationTimeSeconds, getIssuedAtTimeSeconds, getIssuer, getJwtId, getNotBeforeTimeSeconds, getSubject, getType
getFactory, setFactory, toPrettyString, toString
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, isEmpty, keySet, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, 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.Payload
public GoogleIdToken.Payload setAuthorizedParty(String authorizedParty)
setAuthorizedParty
in class IdToken.Payload
public GoogleIdToken.Payload setNonce(String nonce)
setNonce
in class IdToken.Payload
public GoogleIdToken.Payload setAccessTokenHash(String accessTokenHash)
setAccessTokenHash
in class IdToken.Payload
public GoogleIdToken.Payload setClassReference(String classReference)
setClassReference
in class IdToken.Payload
public GoogleIdToken.Payload setMethodsReferences(List<String> methodsReferences)
setMethodsReferences
in class IdToken.Payload
public GoogleIdToken.Payload setExpirationTimeSeconds(Long expirationTimeSeconds)
setExpirationTimeSeconds
in class IdToken.Payload
public GoogleIdToken.Payload setNotBeforeTimeSeconds(Long notBeforeTimeSeconds)
setNotBeforeTimeSeconds
in class IdToken.Payload
public GoogleIdToken.Payload setIssuedAtTimeSeconds(Long issuedAtTimeSeconds)
setIssuedAtTimeSeconds
in class IdToken.Payload
public GoogleIdToken.Payload setIssuer(String issuer)
setIssuer
in class IdToken.Payload
public GoogleIdToken.Payload setAudience(Object audience)
setAudience
in class IdToken.Payload
public GoogleIdToken.Payload setJwtId(String jwtId)
setJwtId
in class IdToken.Payload
public GoogleIdToken.Payload setType(String type)
setType
in class IdToken.Payload
public GoogleIdToken.Payload setSubject(String subject)
setSubject
in class IdToken.Payload
public GoogleIdToken.Payload set(String fieldName, Object value)
set
in class IdToken.Payload
public GoogleIdToken.Payload clone()
clone
in class IdToken.Payload
Copyright © 2010–2022 Google. All rights reserved.