Class: Google::Apis::Oauth2V1::Tokeninfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/oauth2_v1/classes.rb,
generated/google/apis/oauth2_v1/representations.rb,
generated/google/apis/oauth2_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Tokeninfo

Returns a new instance of Tokeninfo.



94
95
96
# File 'generated/google/apis/oauth2_v1/classes.rb', line 94

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#access_typeString

The access type granted with this token. It can be offline or online. Corresponds to the JSON property access_type

Returns:

  • (String)


32
33
34
# File 'generated/google/apis/oauth2_v1/classes.rb', line 32

def access_type
  @access_type
end

#audienceString

Who is the intended audience for this token. In general the same as issued_to. Corresponds to the JSON property audience

Returns:

  • (String)


37
38
39
# File 'generated/google/apis/oauth2_v1/classes.rb', line 37

def audience
  @audience
end

#emailString

The email address of the user. Present only if the email scope is present in the request. Corresponds to the JSON property email

Returns:

  • (String)


43
44
45
# File 'generated/google/apis/oauth2_v1/classes.rb', line 43

def email
  @email
end

#email_verifiedBoolean Also known as: email_verified?

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 email_verified

Returns:

  • (Boolean)


49
50
51
# File 'generated/google/apis/oauth2_v1/classes.rb', line 49

def email_verified
  @email_verified
end

#expires_inFixnum

The expiry time of the token, as number of seconds left until expiry. Corresponds to the JSON property expires_in

Returns:

  • (Fixnum)


55
56
57
# File 'generated/google/apis/oauth2_v1/classes.rb', line 55

def expires_in
  @expires_in
end

#issued_atFixnum

The issue time of the token, as number of seconds. Corresponds to the JSON property issued_at

Returns:

  • (Fixnum)


60
61
62
# File 'generated/google/apis/oauth2_v1/classes.rb', line 60

def issued_at
  @issued_at
end

#issued_toString

To whom was the token issued to. In general the same as audience. Corresponds to the JSON property issued_to

Returns:

  • (String)


65
66
67
# File 'generated/google/apis/oauth2_v1/classes.rb', line 65

def issued_to
  @issued_to
end

#issuerString

Who issued the token. Corresponds to the JSON property issuer

Returns:

  • (String)


70
71
72
# File 'generated/google/apis/oauth2_v1/classes.rb', line 70

def issuer
  @issuer
end

#nonceString

Nonce of the id token. Corresponds to the JSON property nonce

Returns:

  • (String)


75
76
77
# File 'generated/google/apis/oauth2_v1/classes.rb', line 75

def nonce
  @nonce
end

#scopeString

The space separated list of scopes granted to this token. Corresponds to the JSON property scope

Returns:

  • (String)


80
81
82
# File 'generated/google/apis/oauth2_v1/classes.rb', line 80

def scope
  @scope
end

#user_idString

The obfuscated user id. Corresponds to the JSON property user_id

Returns:

  • (String)


85
86
87
# File 'generated/google/apis/oauth2_v1/classes.rb', line 85

def user_id
  @user_id
end

#verified_emailBoolean Also known as: verified_email?

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

Returns:

  • (Boolean)


91
92
93
# File 'generated/google/apis/oauth2_v1/classes.rb', line 91

def verified_email
  @verified_email
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'generated/google/apis/oauth2_v1/classes.rb', line 99

def update!(**args)
  @access_type = args[:access_type] if args.key?(:access_type)
  @audience = args[:audience] if args.key?(:audience)
  @email = args[:email] if args.key?(:email)
  @email_verified = args[:email_verified] if args.key?(:email_verified)
  @expires_in = args[:expires_in] if args.key?(:expires_in)
  @issued_at = args[:issued_at] if args.key?(:issued_at)
  @issued_to = args[:issued_to] if args.key?(:issued_to)
  @issuer = args[:issuer] if args.key?(:issuer)
  @nonce = args[:nonce] if args.key?(:nonce)
  @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