google-apis-sts_v1 0.25.0 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fffe1e77900186251e2d0765655ed2d0cbe75a9823738c7dff9aa971c09fd9fc
4
- data.tar.gz: da94e4cae68bf538adaec4a065a7efbfd17db0ea6e8f75daec73af0d61e534a7
3
+ metadata.gz: fadd8aadcb05cd9c6d939d94fda1d80a2d090833e1041ea98aa0ed9827e3e921
4
+ data.tar.gz: 193da3ec3bd95e5c07c88ee95e1f04567095d55e80b75a10656fa382c589c681
5
5
  SHA512:
6
- metadata.gz: cf8ffd6a8fec67dca0811acc98844c84ca088ee300529f690867c634e45d1803abde1186792ce7ee70a35a29b2ed8fc52a654ae14bcf398c9b935d82f3b55c54
7
- data.tar.gz: f11b39eb13c4ac2adf148b017fd168007a151958ae07f55b81d9d45420dc88533f39ea0818420113eca337d08f90cd7f896ea614b6a832193da7984a62ad9cb7
6
+ metadata.gz: 4cb1d37704dfa8eb2575316ca7f9e2d59947b8db75a2a025bd07c91406fc825a3d8952297ca2c1003ff33f26a045a6432cc57d5d75e3a531819e03cf983cd90d
7
+ data.tar.gz: 757d6e2c4b29870ac93e23c5af2dff831d82e1ffa4f3b630e83ee2a1fca9eb79f9d0171953dbe33f437d2d82c5f9458410f42388ccf7664f1eb2064ddc35cb8f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release history for google-apis-sts_v1
2
2
 
3
+ ### v0.27.0 (2023-01-29)
4
+
5
+ * Regenerated from discovery document revision 20230121
6
+ * Regenerated using generator version 0.11.1
7
+
8
+ ### v0.26.0 (2022-12-09)
9
+
10
+ * Regenerated from discovery document revision 20221204
11
+
3
12
  ### v0.25.0 (2022-10-20)
4
13
 
5
14
  * Regenerated using generator version 0.11.0
@@ -174,6 +174,144 @@ module Google
174
174
  end
175
175
  end
176
176
 
177
+ # Request message for ExchangeOauthToken
178
+ class GoogleIdentityStsV1ExchangeOauthTokenRequest
179
+ include Google::Apis::Core::Hashable
180
+
181
+ # Optional. The client identifier for the OAuth 2.0 client that requested the
182
+ # provided token. It is REQUIRED when the [client] (https://www.rfc-editor.org/
183
+ # rfc/rfc6749#section-1.1) is not authenticating with the authorization server,
184
+ # i.e. when authentication method is [client authentication] (https://www.rfc-
185
+ # editor.org/rfc/rfc6749#section-3.2.1).
186
+ # Corresponds to the JSON property `clientId`
187
+ # @return [String]
188
+ attr_accessor :client_id
189
+
190
+ # Optional. The authorization code that was previously from workforce identity
191
+ # federation's `authorize` endpoint. Required if the flow is authorization code
192
+ # flow, i.e. if grant_type is 'authorization_code'
193
+ # Corresponds to the JSON property `code`
194
+ # @return [String]
195
+ attr_accessor :code
196
+
197
+ # Optional. The code verifier for the PKCE request, Google Cloud CLI originally
198
+ # generates it before the authorization request. PKCE is used to protect
199
+ # authorization code from interception attacks. See https://www.rfc-editor.org/
200
+ # rfc/rfc7636#section-1.1 and https://www.rfc-editor.org/rfc/rfc7636#section-3.
201
+ # It is required when the flow is authorization code flow, i.e. if grant_type is
202
+ # 'authorization_code'
203
+ # Corresponds to the JSON property `codeVerifier`
204
+ # @return [String]
205
+ attr_accessor :code_verifier
206
+
207
+ # Required. The grant types are as follows: - 'authorization_code' : an
208
+ # authorization code flow, i.e. exchange of authorization code for the Oauth
209
+ # access token - 'refresh_token' : a refresh token flow, i.e. obtain a new
210
+ # access token by providing the refresh token. See https://www.rfc-editor.org/
211
+ # rfc/rfc6749#section-6
212
+ # Corresponds to the JSON property `grantType`
213
+ # @return [String]
214
+ attr_accessor :grant_type
215
+
216
+ # Optional. redirect_url is required when the flow is authorization code flow i.
217
+ # e. if grant_type is `authorization_code` See https://www.rfc-editor.org/rfc/
218
+ # rfc6749#section-4.1.3
219
+ # Corresponds to the JSON property `redirectUri`
220
+ # @return [String]
221
+ attr_accessor :redirect_uri
222
+
223
+ # Optional. The Refresh token is the credential that is used to obtain a new
224
+ # access token when the current access token becomes invalid or expires.
225
+ # Required when using refresh token flow, i.e. if `grant_type` is 'refresh_token'
226
+ # See https://www.rfc-editor.org/rfc/rfc6749#section-1.5 and https://www.rfc-
227
+ # editor.org/rfc/rfc6749#section-6
228
+ # Corresponds to the JSON property `refreshToken`
229
+ # @return [String]
230
+ attr_accessor :refresh_token
231
+
232
+ # Optional. An optional list of scopes that are requested for the token to be
233
+ # returned. See https://www.rfc-editor.org/rfc/rfc6749#section-3.3 Must be a
234
+ # list of space-delimited, case-sensitive strings. Note: Currently, the scopes
235
+ # in the request are not supported
236
+ # Corresponds to the JSON property `scope`
237
+ # @return [String]
238
+ attr_accessor :scope
239
+
240
+ def initialize(**args)
241
+ update!(**args)
242
+ end
243
+
244
+ # Update properties of this object
245
+ def update!(**args)
246
+ @client_id = args[:client_id] if args.key?(:client_id)
247
+ @code = args[:code] if args.key?(:code)
248
+ @code_verifier = args[:code_verifier] if args.key?(:code_verifier)
249
+ @grant_type = args[:grant_type] if args.key?(:grant_type)
250
+ @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
251
+ @refresh_token = args[:refresh_token] if args.key?(:refresh_token)
252
+ @scope = args[:scope] if args.key?(:scope)
253
+ end
254
+ end
255
+
256
+ # Response message for ExchangeOauthToken. see https://www.rfc-editor.org/rfc/
257
+ # rfc6749#section-5.1
258
+ class GoogleIdentityStsV1ExchangeOauthTokenResponse
259
+ include Google::Apis::Core::Hashable
260
+
261
+ # An OAuth 2.0 security token, issued by Google, in response to the Oauth token
262
+ # exchange request for the authorization code and refresh token flows. The
263
+ # returned [access token](https://www.rfc-editor.org/rfc/rfc6749#section-4.1.4).
264
+ # Tokens can vary in size, depending, in part, on the size of mapped claims, up
265
+ # to a maximum of 12288 bytes (12 KB). Google reserves the right to change the
266
+ # token size and the maximum length at any time.
267
+ # Corresponds to the JSON property `access_token`
268
+ # @return [String]
269
+ attr_accessor :access_token
270
+
271
+ # The amount of time, in seconds, between the time when the access token was
272
+ # issued and the time when the access token will expires.
273
+ # Corresponds to the JSON property `expires_in`
274
+ # @return [Fixnum]
275
+ attr_accessor :expires_in
276
+
277
+ # Google issued ID token in response to the OAuth token exchange request for ID
278
+ # token flow.
279
+ # Corresponds to the JSON property `id_token`
280
+ # @return [String]
281
+ attr_accessor :id_token
282
+
283
+ # A refresh token, issued by Google, in response to the OAuth token exchange
284
+ # request for refresh token flow
285
+ # Corresponds to the JSON property `refresh_token`
286
+ # @return [String]
287
+ attr_accessor :refresh_token
288
+
289
+ # A list of scopes associated with the returned token.
290
+ # Corresponds to the JSON property `scope`
291
+ # @return [String]
292
+ attr_accessor :scope
293
+
294
+ # The type of token. Field reserved for RFC compliance. See https://www.rfc-
295
+ # editor.org/rfc/rfc6749#section-5.1
296
+ # Corresponds to the JSON property `token_type`
297
+ # @return [String]
298
+ attr_accessor :token_type
299
+
300
+ def initialize(**args)
301
+ update!(**args)
302
+ end
303
+
304
+ # Update properties of this object
305
+ def update!(**args)
306
+ @access_token = args[:access_token] if args.key?(:access_token)
307
+ @expires_in = args[:expires_in] if args.key?(:expires_in)
308
+ @id_token = args[:id_token] if args.key?(:id_token)
309
+ @refresh_token = args[:refresh_token] if args.key?(:refresh_token)
310
+ @scope = args[:scope] if args.key?(:scope)
311
+ @token_type = args[:token_type] if args.key?(:token_type)
312
+ end
313
+ end
314
+
177
315
  # Request message for ExchangeToken.
178
316
  class GoogleIdentityStsV1ExchangeTokenRequest
179
317
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module StsV1
18
18
  # Version of the google-apis-sts_v1 gem
19
- GEM_VERSION = "0.25.0"
19
+ GEM_VERSION = "0.27.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.11.0"
22
+ GENERATOR_VERSION = "0.11.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20220916"
25
+ REVISION = "20230121"
26
26
  end
27
27
  end
28
28
  end
@@ -40,6 +40,18 @@ module Google
40
40
  include Google::Apis::Core::JsonObjectSupport
41
41
  end
42
42
 
43
+ class GoogleIdentityStsV1ExchangeOauthTokenRequest
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class GoogleIdentityStsV1ExchangeOauthTokenResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
43
55
  class GoogleIdentityStsV1ExchangeTokenRequest
44
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
57
 
@@ -122,6 +134,31 @@ module Google
122
134
  end
123
135
  end
124
136
 
137
+ class GoogleIdentityStsV1ExchangeOauthTokenRequest
138
+ # @private
139
+ class Representation < Google::Apis::Core::JsonRepresentation
140
+ property :client_id, as: 'clientId'
141
+ property :code, as: 'code'
142
+ property :code_verifier, as: 'codeVerifier'
143
+ property :grant_type, as: 'grantType'
144
+ property :redirect_uri, as: 'redirectUri'
145
+ property :refresh_token, as: 'refreshToken'
146
+ property :scope, as: 'scope'
147
+ end
148
+ end
149
+
150
+ class GoogleIdentityStsV1ExchangeOauthTokenResponse
151
+ # @private
152
+ class Representation < Google::Apis::Core::JsonRepresentation
153
+ property :access_token, as: 'access_token'
154
+ property :expires_in, as: 'expires_in'
155
+ property :id_token, as: 'id_token'
156
+ property :refresh_token, as: 'refresh_token'
157
+ property :scope, as: 'scope'
158
+ property :token_type, as: 'token_type'
159
+ end
160
+ end
161
+
125
162
  class GoogleIdentityStsV1ExchangeTokenRequest
126
163
  # @private
127
164
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -82,13 +82,51 @@ module Google
82
82
  execute_or_queue_command(command, &block)
83
83
  end
84
84
 
85
+ # Exchanges a credential that represents the resource owner's authorization for
86
+ # a Google-generated [OAuth 2.0 access token] (https://www.rfc-editor.org/rfc/
87
+ # rfc6749#section-5) or [refreshes an accesstoken] (https://www.rfc-editor.org/
88
+ # rfc/rfc6749#section-6) following [the OAuth 2.0 authorization framework] (
89
+ # https://tools.ietf.org/html/rfc8693) The credential can be one of the
90
+ # following: - An authorization code issued by the workforce identity federation
91
+ # authorization endpoint - A [refresh token](https://www.rfc-editor.org/rfc/
92
+ # rfc6749#section-10.4) issued by this endpoint This endpoint is only meant to
93
+ # be called by the Google Cloud CLI. Also note that this API only accepts the
94
+ # authorization code issued for workforce pools.
95
+ # @param [Google::Apis::StsV1::GoogleIdentityStsV1ExchangeOauthTokenRequest] google_identity_sts_v1_exchange_oauth_token_request_object
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # @param [Google::Apis::RequestOptions] options
102
+ # Request-specific options
103
+ #
104
+ # @yield [result, err] Result & error if block supplied
105
+ # @yieldparam result [Google::Apis::StsV1::GoogleIdentityStsV1ExchangeOauthTokenResponse] parsed result object
106
+ # @yieldparam err [StandardError] error object if request failed
107
+ #
108
+ # @return [Google::Apis::StsV1::GoogleIdentityStsV1ExchangeOauthTokenResponse]
109
+ #
110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
113
+ def oauthtoken(google_identity_sts_v1_exchange_oauth_token_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
114
+ command = make_simple_command(:post, 'v1/oauthtoken', options)
115
+ command.request_representation = Google::Apis::StsV1::GoogleIdentityStsV1ExchangeOauthTokenRequest::Representation
116
+ command.request_object = google_identity_sts_v1_exchange_oauth_token_request_object
117
+ command.response_representation = Google::Apis::StsV1::GoogleIdentityStsV1ExchangeOauthTokenResponse::Representation
118
+ command.response_class = Google::Apis::StsV1::GoogleIdentityStsV1ExchangeOauthTokenResponse
119
+ command.query['fields'] = fields unless fields.nil?
120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
121
+ execute_or_queue_command(command, &block)
122
+ end
123
+
85
124
  # Exchanges a credential for a Google OAuth 2.0 access token. The token asserts
86
125
  # an external identity within an identity pool, or it applies a Credential
87
126
  # Access Boundary to a Google access token. Note that workforce pools do not
88
- # support Credential Access Boundary at the moment. When you call this method,
89
- # do not send the `Authorization` HTTP header in the request. This method does
90
- # not require the `Authorization` header, and using the header can cause the
91
- # request to fail.
127
+ # support Credential Access Boundaries. When you call this method, do not send
128
+ # the `Authorization` HTTP header in the request. This method does not require
129
+ # the `Authorization` header, and using the header can cause the request to fail.
92
130
  # @param [Google::Apis::StsV1::GoogleIdentityStsV1ExchangeTokenRequest] google_identity_sts_v1_exchange_token_request_object
93
131
  # @param [String] fields
94
132
  # Selector specifying which fields to include in a partial response.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-sts_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-21 00:00:00.000000000 Z
11
+ date: 2023-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-sts_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-sts_v1/v0.25.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-sts_v1/v0.27.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-sts_v1
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.3.14
78
+ rubygems_version: 3.4.2
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Security Token Service API V1