Structure
GoogleIdentityToken
struct GoogleIdentityToken
Overview
See Also: An ID token’s payload
Topics
Initializers
init(from:)Creates a new instance by decoding from the given decoder.init(issuer:subject:audience:authorizedPresenter:issuedAt:expires:atHash:hostedDomain:email:emailVerified:name:picture:profile:givenName:familyName:locale:nonce:)
Instance Properties
atHashAccess token hash.audienceThe audience that this ID token is intended for. It must be one of the OAuth 2.0 client IDs of your application.authorizedPresenterThe client_id of the authorized presenter.emailThe user’s email address.emailVerifiedTrueif the user’s e-mail address has been verified; otherwisefalse.expiresExpiration time on or after which the ID token must not be accepted.familyNameThe user’s surname(s) or last name(s). Might be provided when anameclaim is present.givenNameThe user’s given name(s) or first name(s). Might be provided when anameclaim is present.hostedDomainThe hosted G Suite domain of the user. Provided only if the user belongs to a hosted domain.issuedAtThe time the ID token was issued.issuerThe Issuer Identifier for the Issuer of the response. Always https://accounts.google.com or accounts.google.com for Google ID tokens.localeThe user’s locale, represented by a BCP 47 language tag. Might be provided when a name claim is present.nameThe user’s full name, in a displayable form.nonceThe value of the nonce supplied by your app in the authentication request. You should enforce protection against replay attacks by ensuring it is presented only once.pictureThe URL of the user’s profile picture.profileThe URL of the user’s profile picture.subjectAn identifier for the user, unique among all Google accounts and never reused.
Instance Methods
verify(using:)Verifies that the payload’s claims are correct or throws an error.
Relationships
Conforms To
JWTPayloadSwift.DecodableSwift.EncodableSwift.SendableSwift.SendableMetatype