Skip to content

Structure

GoogleIdentityToken

struct GoogleIdentityToken

Overview

  • See Also: An ID token’s payload

Topics

Initializers

Instance Properties

  • atHash
    Access token hash.
  • audience
    The audience that this ID token is intended for. It must be one of the OAuth 2.0 client IDs of your application.
  • authorizedPresenter
    The client_id of the authorized presenter.
  • email
    The user’s email address.
  • emailVerified
    True if the user’s e-mail address has been verified; otherwise false.
  • expires
    Expiration time on or after which the ID token must not be accepted.
  • familyName
    The user’s surname(s) or last name(s). Might be provided when a name claim is present.
  • givenName
    The user’s given name(s) or first name(s). Might be provided when a name claim is present.
  • hostedDomain
    The hosted G Suite domain of the user. Provided only if the user belongs to a hosted domain.
  • issuedAt
    The time the ID token was issued.
  • issuer
    The Issuer Identifier for the Issuer of the response. Always https://accounts.google.com or accounts.google.com for Google ID tokens.
  • locale
    The user’s locale, represented by a BCP 47 language tag. Might be provided when a name claim is present.
  • name
    The user’s full name, in a displayable form.
  • nonce
    The 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.
  • picture
    The URL of the user’s profile picture.
  • profile
    The URL of the user’s profile picture.
  • subject
    An 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

  • JWTPayload
  • Swift.Decodable
  • Swift.Encodable
  • Swift.Sendable
  • Swift.SendableMetatype