Class: Google::Apis::StsV1::GoogleIdentityStsV1ExchangeOauthTokenResponse

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

Overview

Response message for ExchangeOauthToken. see https://www.rfc-editor.org/rfc/ rfc6749#section-5.1

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleIdentityStsV1ExchangeOauthTokenResponse

Returns a new instance of GoogleIdentityStsV1ExchangeOauthTokenResponse.



300
301
302
# File 'lib/google/apis/sts_v1/classes.rb', line 300

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

Instance Attribute Details

#access_tokenString

An OAuth 2.0 security token, issued by Google, in response to the Oauth token exchange request for the authorization code and refresh token flows. The returned access token. Tokens can vary in size, depending, in part, on the size of mapped claims, up to a maximum of 12288 bytes (12 KB). Google reserves the right to change the token size and the maximum length at any time. Corresponds to the JSON property access_token

Returns:

  • (String)


269
270
271
# File 'lib/google/apis/sts_v1/classes.rb', line 269

def access_token
  @access_token
end

#expires_inFixnum

The amount of time, in seconds, between the time when the access token was issued and the time when the access token will expires. Corresponds to the JSON property expires_in

Returns:

  • (Fixnum)


275
276
277
# File 'lib/google/apis/sts_v1/classes.rb', line 275

def expires_in
  @expires_in
end

#id_tokenString

Google issued ID token in response to the OAuth token exchange request for ID token flow. Corresponds to the JSON property id_token

Returns:

  • (String)


281
282
283
# File 'lib/google/apis/sts_v1/classes.rb', line 281

def id_token
  @id_token
end

#refresh_tokenString

A refresh token, issued by Google, in response to the OAuth token exchange request for refresh token flow Corresponds to the JSON property refresh_token

Returns:

  • (String)


287
288
289
# File 'lib/google/apis/sts_v1/classes.rb', line 287

def refresh_token
  @refresh_token
end

#scopeString

A list of scopes associated with the returned token. Corresponds to the JSON property scope

Returns:

  • (String)


292
293
294
# File 'lib/google/apis/sts_v1/classes.rb', line 292

def scope
  @scope
end

#token_typeString

The type of token. Field reserved for RFC compliance. See https://www.rfc- editor.org/rfc/rfc6749#section-5.1 Corresponds to the JSON property token_type

Returns:

  • (String)


298
299
300
# File 'lib/google/apis/sts_v1/classes.rb', line 298

def token_type
  @token_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



305
306
307
308
309
310
311
312
# File 'lib/google/apis/sts_v1/classes.rb', line 305

def update!(**args)
  @access_token = args[:access_token] if args.key?(:access_token)
  @expires_in = args[:expires_in] if args.key?(:expires_in)
  @id_token = args[:id_token] if args.key?(:id_token)
  @refresh_token = args[:refresh_token] if args.key?(:refresh_token)
  @scope = args[:scope] if args.key?(:scope)
  @token_type = args[:token_type] if args.key?(:token_type)
end