class Google::Apis::Oauth2V2::Tokeninfo

Attributes

audience[RW]

Who is the intended audience for this token. In general the same as issued_to. Corresponds to the JSON property `audience` @return [String]

email[RW]

The email address of the user. Present only if the email scope is present in the request. Corresponds to the JSON property `email` @return [String]

expires_in[RW]

The expiry time of the token, as number of seconds left until expiry. Corresponds to the JSON property `expires_in` @return [Fixnum]

issued_to[RW]

To whom was the token issued to. In general the same as audience. Corresponds to the JSON property `issued_to` @return [String]

scope[RW]

The space separated list of scopes granted to this token. Corresponds to the JSON property `scope` @return [String]

user_id[RW]

The obfuscated user id. Corresponds to the JSON property `user_id` @return [String]

verified_email[RW]

Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request. Corresponds to the JSON property `verified_email` @return [Boolean]

verified_email?[RW]

Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request. Corresponds to the JSON property `verified_email` @return [Boolean]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/oauth2_v2/classes.rb, line 67
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/oauth2_v2/classes.rb, line 72
def update!(**args)
  @audience = args[:audience] if args.key?(:audience)
  @email = args[:email] if args.key?(:email)
  @expires_in = args[:expires_in] if args.key?(:expires_in)
  @issued_to = args[:issued_to] if args.key?(:issued_to)
  @scope = args[:scope] if args.key?(:scope)
  @user_id = args[:user_id] if args.key?(:user_id)
  @verified_email = args[:verified_email] if args.key?(:verified_email)
end