Class: Google::Apis::StsV1::GoogleIdentityStsV1ExchangeOauthTokenRequest

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

Request message for ExchangeOauthToken

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleIdentityStsV1ExchangeOauthTokenRequest

Returns a new instance of GoogleIdentityStsV1ExchangeOauthTokenRequest.



240
241
242
# File 'lib/google/apis/sts_v1/classes.rb', line 240

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

Instance Attribute Details

#client_idString

Optional. The client identifier for the OAuth 2.0 client that requested the provided token. It is REQUIRED when the client is not authenticating with the authorization server, i.e. when authentication method is client authentication. Corresponds to the JSON property clientId

Returns:

  • (String)


188
189
190
# File 'lib/google/apis/sts_v1/classes.rb', line 188

def client_id
  @client_id
end

#codeString

Optional. The authorization code that was previously from workforce identity federation's authorize endpoint. Required if the flow is authorization code flow, i.e. if grant_type is 'authorization_code' Corresponds to the JSON property code

Returns:

  • (String)


195
196
197
# File 'lib/google/apis/sts_v1/classes.rb', line 195

def code
  @code
end

#code_verifierString

Optional. The code verifier for the PKCE request, Google Cloud CLI originally generates it before the authorization request. PKCE is used to protect authorization code from interception attacks. See https://www.rfc-editor.org/ rfc/rfc7636#section-1.1 and https://www.rfc-editor.org/rfc/rfc7636#section-3. It is required when the flow is authorization code flow, i.e. if grant_type is 'authorization_code' Corresponds to the JSON property codeVerifier

Returns:

  • (String)


205
206
207
# File 'lib/google/apis/sts_v1/classes.rb', line 205

def code_verifier
  @code_verifier
end

#grant_typeString

Required. The grant types are as follows: - 'authorization_code' : an authorization code flow, i.e. exchange of authorization code for the Oauth access token - 'refresh_token' : a refresh token flow, i.e. obtain a new access token by providing the refresh token. See https://www.rfc-editor.org/ rfc/rfc6749#section-6 Corresponds to the JSON property grantType

Returns:

  • (String)


214
215
216
# File 'lib/google/apis/sts_v1/classes.rb', line 214

def grant_type
  @grant_type
end

#redirect_uriString

Optional. redirect_url is required when the flow is authorization code flow i. e. if grant_type is authorization_code See https://www.rfc-editor.org/rfc/ rfc6749#section-4.1.3 Corresponds to the JSON property redirectUri

Returns:

  • (String)


221
222
223
# File 'lib/google/apis/sts_v1/classes.rb', line 221

def redirect_uri
  @redirect_uri
end

#refresh_tokenString

Optional. The Refresh token is the credential that is used to obtain a new access token when the current access token becomes invalid or expires. Required when using refresh token flow, i.e. if grant_type is 'refresh_token' See https://www.rfc-editor.org/rfc/rfc6749#section-1.5 and https://www.rfc- editor.org/rfc/rfc6749#section-6 Corresponds to the JSON property refreshToken

Returns:

  • (String)


230
231
232
# File 'lib/google/apis/sts_v1/classes.rb', line 230

def refresh_token
  @refresh_token
end

#scopeString

Optional. An optional list of scopes that are requested for the token to be returned. See https://www.rfc-editor.org/rfc/rfc6749#section-3.3 Must be a list of space-delimited, case-sensitive strings. Note: Currently, the scopes in the request are not supported Corresponds to the JSON property scope

Returns:

  • (String)


238
239
240
# File 'lib/google/apis/sts_v1/classes.rb', line 238

def scope
  @scope
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



245
246
247
248
249
250
251
252
253
# File 'lib/google/apis/sts_v1/classes.rb', line 245

def update!(**args)
  @client_id = args[:client_id] if args.key?(:client_id)
  @code = args[:code] if args.key?(:code)
  @code_verifier = args[:code_verifier] if args.key?(:code_verifier)
  @grant_type = args[:grant_type] if args.key?(:grant_type)
  @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
  @refresh_token = args[:refresh_token] if args.key?(:refresh_token)
  @scope = args[:scope] if args.key?(:scope)
end