Class: Google::Apis::Oauth2V2::Tokeninfo
- Inherits:
-
Object
- Object
- Google::Apis::Oauth2V2::Tokeninfo
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/oauth2_v2/classes.rb,
generated/google/apis/oauth2_v2/representations.rb,
generated/google/apis/oauth2_v2/representations.rb
Instance Attribute Summary collapse
-
#access_type ⇒ String
The access type granted with this token.
-
#audience ⇒ String
Who is the intended audience for this token.
-
#email ⇒ String
The email address of the user.
-
#expires_in ⇒ Fixnum
The expiry time of the token, as number of seconds left until expiry.
-
#issued_to ⇒ String
To whom was the token issued to.
-
#scope ⇒ String
The space separated list of scopes granted to this token.
-
#token_handle ⇒ String
The token handle associated with this token.
-
#user_id ⇒ String
The obfuscated user id.
-
#verified_email ⇒ Boolean
(also: #verified_email?)
Boolean flag which is true if the email address is verified.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Tokeninfo
constructor
A new instance of Tokeninfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Tokeninfo
Returns a new instance of Tokeninfo
145 146 147 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 145 def initialize(**args) update!(**args) end |
Instance Attribute Details
#access_type ⇒ String
The access type granted with this token. It can be offline or online.
Corresponds to the JSON property access_type
100 101 102 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 100 def access_type @access_type end |
#audience ⇒ String
Who is the intended audience for this token. In general the same as issued_to.
Corresponds to the JSON property audience
105 106 107 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 105 def audience @audience end |
#email ⇒ String
The email address of the user. Present only if the email scope is present in
the request.
Corresponds to the JSON property email
111 112 113 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 111 def email @email end |
#expires_in ⇒ Fixnum
The expiry time of the token, as number of seconds left until expiry.
Corresponds to the JSON property expires_in
116 117 118 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 116 def expires_in @expires_in end |
#issued_to ⇒ String
To whom was the token issued to. In general the same as audience.
Corresponds to the JSON property issued_to
121 122 123 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 121 def issued_to @issued_to end |
#scope ⇒ String
The space separated list of scopes granted to this token.
Corresponds to the JSON property scope
126 127 128 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 126 def scope @scope end |
#token_handle ⇒ String
The token handle associated with this token.
Corresponds to the JSON property token_handle
131 132 133 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 131 def token_handle @token_handle end |
#user_id ⇒ String
The obfuscated user id.
Corresponds to the JSON property user_id
136 137 138 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 136 def user_id @user_id end |
#verified_email ⇒ Boolean 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
142 143 144 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 142 def verified_email @verified_email end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
150 151 152 153 154 155 156 157 158 159 160 |
# File 'generated/google/apis/oauth2_v2/classes.rb', line 150 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) @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) @token_handle = args[:token_handle] if args.key?(:token_handle) @user_id = args[:user_id] if args.key?(:user_id) @verified_email = args[:verified_email] if args.key?(:verified_email) end |