aws-sdk-core 3.131.0 → 3.158.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,534 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::SSOOIDC
11
+ module Types
12
+
13
+ # You do not have sufficient access to perform this action.
14
+ #
15
+ # @!attribute [rw] error
16
+ # @return [String]
17
+ #
18
+ # @!attribute [rw] error_description
19
+ # @return [String]
20
+ #
21
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/AccessDeniedException AWS API Documentation
22
+ #
23
+ class AccessDeniedException < Struct.new(
24
+ :error,
25
+ :error_description)
26
+ SENSITIVE = []
27
+ include Aws::Structure
28
+ end
29
+
30
+ # Indicates that a request to authorize a client with an access user
31
+ # session token is pending.
32
+ #
33
+ # @!attribute [rw] error
34
+ # @return [String]
35
+ #
36
+ # @!attribute [rw] error_description
37
+ # @return [String]
38
+ #
39
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/AuthorizationPendingException AWS API Documentation
40
+ #
41
+ class AuthorizationPendingException < Struct.new(
42
+ :error,
43
+ :error_description)
44
+ SENSITIVE = []
45
+ include Aws::Structure
46
+ end
47
+
48
+ # @note When making an API call, you may pass CreateTokenRequest
49
+ # data as a hash:
50
+ #
51
+ # {
52
+ # client_id: "ClientId", # required
53
+ # client_secret: "ClientSecret", # required
54
+ # grant_type: "GrantType", # required
55
+ # device_code: "DeviceCode",
56
+ # code: "AuthCode",
57
+ # refresh_token: "RefreshToken",
58
+ # scope: ["Scope"],
59
+ # redirect_uri: "URI",
60
+ # }
61
+ #
62
+ # @!attribute [rw] client_id
63
+ # The unique identifier string for each client. This value should come
64
+ # from the persisted result of the RegisterClient API.
65
+ # @return [String]
66
+ #
67
+ # @!attribute [rw] client_secret
68
+ # A secret string generated for the client. This value should come
69
+ # from the persisted result of the RegisterClient API.
70
+ # @return [String]
71
+ #
72
+ # @!attribute [rw] grant_type
73
+ # Supports grant types for the authorization code, refresh token, and
74
+ # device code request. For device code requests, specify the following
75
+ # value:
76
+ #
77
+ # `urn:ietf:params:oauth:grant-type:device_code `
78
+ #
79
+ # For information about how to obtain the device code, see the
80
+ # StartDeviceAuthorization topic.
81
+ # @return [String]
82
+ #
83
+ # @!attribute [rw] device_code
84
+ # Used only when calling this API for the device code grant type. This
85
+ # short-term code is used to identify this authentication attempt.
86
+ # This should come from an in-memory reference to the result of the
87
+ # StartDeviceAuthorization API.
88
+ # @return [String]
89
+ #
90
+ # @!attribute [rw] code
91
+ # The authorization code received from the authorization service. This
92
+ # parameter is required to perform an authorization grant request to
93
+ # get access to a token.
94
+ # @return [String]
95
+ #
96
+ # @!attribute [rw] refresh_token
97
+ # Currently, `refreshToken` is not yet implemented and is not
98
+ # supported. For more information about the features and limitations
99
+ # of the current IAM Identity Center OIDC implementation, see
100
+ # *Considerations for Using this Guide* in the [IAM Identity Center
101
+ # OIDC API Reference][1].
102
+ #
103
+ # The token used to obtain an access token in the event that the
104
+ # access token is invalid or expired.
105
+ #
106
+ #
107
+ #
108
+ # [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
109
+ # @return [String]
110
+ #
111
+ # @!attribute [rw] scope
112
+ # The list of scopes that is defined by the client. Upon
113
+ # authorization, this list is used to restrict permissions when
114
+ # granting an access token.
115
+ # @return [Array<String>]
116
+ #
117
+ # @!attribute [rw] redirect_uri
118
+ # The location of the application that will receive the authorization
119
+ # code. Users authorize the service to send the request to this
120
+ # location.
121
+ # @return [String]
122
+ #
123
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenRequest AWS API Documentation
124
+ #
125
+ class CreateTokenRequest < Struct.new(
126
+ :client_id,
127
+ :client_secret,
128
+ :grant_type,
129
+ :device_code,
130
+ :code,
131
+ :refresh_token,
132
+ :scope,
133
+ :redirect_uri)
134
+ SENSITIVE = []
135
+ include Aws::Structure
136
+ end
137
+
138
+ # @!attribute [rw] access_token
139
+ # An opaque token to access IAM Identity Center resources assigned to
140
+ # a user.
141
+ # @return [String]
142
+ #
143
+ # @!attribute [rw] token_type
144
+ # Used to notify the client that the returned token is an access
145
+ # token. The supported type is `BearerToken`.
146
+ # @return [String]
147
+ #
148
+ # @!attribute [rw] expires_in
149
+ # Indicates the time in seconds when an access token will expire.
150
+ # @return [Integer]
151
+ #
152
+ # @!attribute [rw] refresh_token
153
+ # Currently, `refreshToken` is not yet implemented and is not
154
+ # supported. For more information about the features and limitations
155
+ # of the current IAM Identity Center OIDC implementation, see
156
+ # *Considerations for Using this Guide* in the [IAM Identity Center
157
+ # OIDC API Reference][1].
158
+ #
159
+ # A token that, if present, can be used to refresh a previously issued
160
+ # access token that might have expired.
161
+ #
162
+ #
163
+ #
164
+ # [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
165
+ # @return [String]
166
+ #
167
+ # @!attribute [rw] id_token
168
+ # Currently, `idToken` is not yet implemented and is not supported.
169
+ # For more information about the features and limitations of the
170
+ # current IAM Identity Center OIDC implementation, see *Considerations
171
+ # for Using this Guide* in the [IAM Identity Center OIDC API
172
+ # Reference][1].
173
+ #
174
+ # The identifier of the user that associated with the access token, if
175
+ # present.
176
+ #
177
+ #
178
+ #
179
+ # [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
180
+ # @return [String]
181
+ #
182
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenResponse AWS API Documentation
183
+ #
184
+ class CreateTokenResponse < Struct.new(
185
+ :access_token,
186
+ :token_type,
187
+ :expires_in,
188
+ :refresh_token,
189
+ :id_token)
190
+ SENSITIVE = []
191
+ include Aws::Structure
192
+ end
193
+
194
+ # Indicates that the token issued by the service is expired and is no
195
+ # longer valid.
196
+ #
197
+ # @!attribute [rw] error
198
+ # @return [String]
199
+ #
200
+ # @!attribute [rw] error_description
201
+ # @return [String]
202
+ #
203
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/ExpiredTokenException AWS API Documentation
204
+ #
205
+ class ExpiredTokenException < Struct.new(
206
+ :error,
207
+ :error_description)
208
+ SENSITIVE = []
209
+ include Aws::Structure
210
+ end
211
+
212
+ # Indicates that an error from the service occurred while trying to
213
+ # process a request.
214
+ #
215
+ # @!attribute [rw] error
216
+ # @return [String]
217
+ #
218
+ # @!attribute [rw] error_description
219
+ # @return [String]
220
+ #
221
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InternalServerException AWS API Documentation
222
+ #
223
+ class InternalServerException < Struct.new(
224
+ :error,
225
+ :error_description)
226
+ SENSITIVE = []
227
+ include Aws::Structure
228
+ end
229
+
230
+ # Indicates that the `clientId` or `clientSecret` in the request is
231
+ # invalid. For example, this can occur when a client sends an incorrect
232
+ # `clientId` or an expired `clientSecret`.
233
+ #
234
+ # @!attribute [rw] error
235
+ # @return [String]
236
+ #
237
+ # @!attribute [rw] error_description
238
+ # @return [String]
239
+ #
240
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidClientException AWS API Documentation
241
+ #
242
+ class InvalidClientException < Struct.new(
243
+ :error,
244
+ :error_description)
245
+ SENSITIVE = []
246
+ include Aws::Structure
247
+ end
248
+
249
+ # Indicates that the client information sent in the request during
250
+ # registration is invalid.
251
+ #
252
+ # @!attribute [rw] error
253
+ # @return [String]
254
+ #
255
+ # @!attribute [rw] error_description
256
+ # @return [String]
257
+ #
258
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidClientMetadataException AWS API Documentation
259
+ #
260
+ class InvalidClientMetadataException < Struct.new(
261
+ :error,
262
+ :error_description)
263
+ SENSITIVE = []
264
+ include Aws::Structure
265
+ end
266
+
267
+ # Indicates that a request contains an invalid grant. This can occur if
268
+ # a client makes a CreateToken request with an invalid grant type.
269
+ #
270
+ # @!attribute [rw] error
271
+ # @return [String]
272
+ #
273
+ # @!attribute [rw] error_description
274
+ # @return [String]
275
+ #
276
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidGrantException AWS API Documentation
277
+ #
278
+ class InvalidGrantException < Struct.new(
279
+ :error,
280
+ :error_description)
281
+ SENSITIVE = []
282
+ include Aws::Structure
283
+ end
284
+
285
+ # Indicates that something is wrong with the input to the request. For
286
+ # example, a required parameter might be missing or out of range.
287
+ #
288
+ # @!attribute [rw] error
289
+ # @return [String]
290
+ #
291
+ # @!attribute [rw] error_description
292
+ # @return [String]
293
+ #
294
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidRequestException AWS API Documentation
295
+ #
296
+ class InvalidRequestException < Struct.new(
297
+ :error,
298
+ :error_description)
299
+ SENSITIVE = []
300
+ include Aws::Structure
301
+ end
302
+
303
+ # Indicates that the scope provided in the request is invalid.
304
+ #
305
+ # @!attribute [rw] error
306
+ # @return [String]
307
+ #
308
+ # @!attribute [rw] error_description
309
+ # @return [String]
310
+ #
311
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidScopeException AWS API Documentation
312
+ #
313
+ class InvalidScopeException < Struct.new(
314
+ :error,
315
+ :error_description)
316
+ SENSITIVE = []
317
+ include Aws::Structure
318
+ end
319
+
320
+ # @note When making an API call, you may pass RegisterClientRequest
321
+ # data as a hash:
322
+ #
323
+ # {
324
+ # client_name: "ClientName", # required
325
+ # client_type: "ClientType", # required
326
+ # scopes: ["Scope"],
327
+ # }
328
+ #
329
+ # @!attribute [rw] client_name
330
+ # The friendly name of the client.
331
+ # @return [String]
332
+ #
333
+ # @!attribute [rw] client_type
334
+ # The type of client. The service supports only `public` as a client
335
+ # type. Anything other than public will be rejected by the service.
336
+ # @return [String]
337
+ #
338
+ # @!attribute [rw] scopes
339
+ # The list of scopes that are defined by the client. Upon
340
+ # authorization, this list is used to restrict permissions when
341
+ # granting an access token.
342
+ # @return [Array<String>]
343
+ #
344
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClientRequest AWS API Documentation
345
+ #
346
+ class RegisterClientRequest < Struct.new(
347
+ :client_name,
348
+ :client_type,
349
+ :scopes)
350
+ SENSITIVE = []
351
+ include Aws::Structure
352
+ end
353
+
354
+ # @!attribute [rw] client_id
355
+ # The unique identifier string for each client. This client uses this
356
+ # identifier to get authenticated by the service in subsequent calls.
357
+ # @return [String]
358
+ #
359
+ # @!attribute [rw] client_secret
360
+ # A secret string generated for the client. The client will use this
361
+ # string to get authenticated by the service in subsequent calls.
362
+ # @return [String]
363
+ #
364
+ # @!attribute [rw] client_id_issued_at
365
+ # Indicates the time at which the `clientId` and `clientSecret` were
366
+ # issued.
367
+ # @return [Integer]
368
+ #
369
+ # @!attribute [rw] client_secret_expires_at
370
+ # Indicates the time at which the `clientId` and `clientSecret` will
371
+ # become invalid.
372
+ # @return [Integer]
373
+ #
374
+ # @!attribute [rw] authorization_endpoint
375
+ # The endpoint where the client can request authorization.
376
+ # @return [String]
377
+ #
378
+ # @!attribute [rw] token_endpoint
379
+ # The endpoint where the client can get an access token.
380
+ # @return [String]
381
+ #
382
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClientResponse AWS API Documentation
383
+ #
384
+ class RegisterClientResponse < Struct.new(
385
+ :client_id,
386
+ :client_secret,
387
+ :client_id_issued_at,
388
+ :client_secret_expires_at,
389
+ :authorization_endpoint,
390
+ :token_endpoint)
391
+ SENSITIVE = []
392
+ include Aws::Structure
393
+ end
394
+
395
+ # Indicates that the client is making the request too frequently and is
396
+ # more than the service can handle.
397
+ #
398
+ # @!attribute [rw] error
399
+ # @return [String]
400
+ #
401
+ # @!attribute [rw] error_description
402
+ # @return [String]
403
+ #
404
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/SlowDownException AWS API Documentation
405
+ #
406
+ class SlowDownException < Struct.new(
407
+ :error,
408
+ :error_description)
409
+ SENSITIVE = []
410
+ include Aws::Structure
411
+ end
412
+
413
+ # @note When making an API call, you may pass StartDeviceAuthorizationRequest
414
+ # data as a hash:
415
+ #
416
+ # {
417
+ # client_id: "ClientId", # required
418
+ # client_secret: "ClientSecret", # required
419
+ # start_url: "URI", # required
420
+ # }
421
+ #
422
+ # @!attribute [rw] client_id
423
+ # The unique identifier string for the client that is registered with
424
+ # IAM Identity Center. This value should come from the persisted
425
+ # result of the RegisterClient API operation.
426
+ # @return [String]
427
+ #
428
+ # @!attribute [rw] client_secret
429
+ # A secret string that is generated for the client. This value should
430
+ # come from the persisted result of the RegisterClient API operation.
431
+ # @return [String]
432
+ #
433
+ # @!attribute [rw] start_url
434
+ # The URL for the AWS access portal. For more information, see [Using
435
+ # the AWS access portal][1] in the *IAM Identity Center User Guide*.
436
+ #
437
+ #
438
+ #
439
+ # [1]: https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html
440
+ # @return [String]
441
+ #
442
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorizationRequest AWS API Documentation
443
+ #
444
+ class StartDeviceAuthorizationRequest < Struct.new(
445
+ :client_id,
446
+ :client_secret,
447
+ :start_url)
448
+ SENSITIVE = []
449
+ include Aws::Structure
450
+ end
451
+
452
+ # @!attribute [rw] device_code
453
+ # The short-lived code that is used by the device when polling for a
454
+ # session token.
455
+ # @return [String]
456
+ #
457
+ # @!attribute [rw] user_code
458
+ # A one-time user verification code. This is needed to authorize an
459
+ # in-use device.
460
+ # @return [String]
461
+ #
462
+ # @!attribute [rw] verification_uri
463
+ # The URI of the verification page that takes the `userCode` to
464
+ # authorize the device.
465
+ # @return [String]
466
+ #
467
+ # @!attribute [rw] verification_uri_complete
468
+ # An alternate URL that the client can use to automatically launch a
469
+ # browser. This process skips the manual step in which the user visits
470
+ # the verification page and enters their code.
471
+ # @return [String]
472
+ #
473
+ # @!attribute [rw] expires_in
474
+ # Indicates the number of seconds in which the verification code will
475
+ # become invalid.
476
+ # @return [Integer]
477
+ #
478
+ # @!attribute [rw] interval
479
+ # Indicates the number of seconds the client must wait between
480
+ # attempts when polling for a session.
481
+ # @return [Integer]
482
+ #
483
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorizationResponse AWS API Documentation
484
+ #
485
+ class StartDeviceAuthorizationResponse < Struct.new(
486
+ :device_code,
487
+ :user_code,
488
+ :verification_uri,
489
+ :verification_uri_complete,
490
+ :expires_in,
491
+ :interval)
492
+ SENSITIVE = []
493
+ include Aws::Structure
494
+ end
495
+
496
+ # Indicates that the client is not currently authorized to make the
497
+ # request. This can happen when a `clientId` is not issued for a public
498
+ # client.
499
+ #
500
+ # @!attribute [rw] error
501
+ # @return [String]
502
+ #
503
+ # @!attribute [rw] error_description
504
+ # @return [String]
505
+ #
506
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/UnauthorizedClientException AWS API Documentation
507
+ #
508
+ class UnauthorizedClientException < Struct.new(
509
+ :error,
510
+ :error_description)
511
+ SENSITIVE = []
512
+ include Aws::Structure
513
+ end
514
+
515
+ # Indicates that the grant type in the request is not supported by the
516
+ # service.
517
+ #
518
+ # @!attribute [rw] error
519
+ # @return [String]
520
+ #
521
+ # @!attribute [rw] error_description
522
+ # @return [String]
523
+ #
524
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/UnsupportedGrantTypeException AWS API Documentation
525
+ #
526
+ class UnsupportedGrantTypeException < Struct.new(
527
+ :error,
528
+ :error_description)
529
+ SENSITIVE = []
530
+ include Aws::Structure
531
+ end
532
+
533
+ end
534
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ unless Module.const_defined?(:Aws)
12
+ require 'aws-sdk-core'
13
+ require 'aws-sigv4'
14
+ end
15
+
16
+ require_relative 'aws-sdk-ssooidc/types'
17
+ require_relative 'aws-sdk-ssooidc/client_api'
18
+ require_relative 'aws-sdk-ssooidc/client'
19
+ require_relative 'aws-sdk-ssooidc/errors'
20
+ require_relative 'aws-sdk-ssooidc/resource'
21
+ require_relative 'aws-sdk-ssooidc/customizations'
22
+
23
+ # This module provides support for AWS SSO OIDC. This module is available in the
24
+ # `aws-sdk-core` gem.
25
+ #
26
+ # # Client
27
+ #
28
+ # The {Client} class provides one method for each API operation. Operation
29
+ # methods each accept a hash of request parameters and return a response
30
+ # structure.
31
+ #
32
+ # ssooidc = Aws::SSOOIDC::Client.new
33
+ # resp = ssooidc.create_token(params)
34
+ #
35
+ # See {Client} for more information.
36
+ #
37
+ # # Errors
38
+ #
39
+ # Errors returned from AWS SSO OIDC are defined in the
40
+ # {Errors} module and all extend {Errors::ServiceError}.
41
+ #
42
+ # begin
43
+ # # do stuff
44
+ # rescue Aws::SSOOIDC::Errors::ServiceError
45
+ # # rescues all AWS SSO OIDC API errors
46
+ # end
47
+ #
48
+ # See {Errors} for more information.
49
+ #
50
+ # @!group service
51
+ module Aws::SSOOIDC
52
+
53
+ GEM_VERSION = '3.158.0'
54
+
55
+ end
@@ -2299,7 +2299,7 @@ module Aws::STS
2299
2299
  params: params,
2300
2300
  config: config)
2301
2301
  context[:gem_name] = 'aws-sdk-core'
2302
- context[:gem_version] = '3.131.0'
2302
+ context[:gem_version] = '3.158.1'
2303
2303
  Seahorse::Client::Request.new(handlers, context)
2304
2304
  end
2305
2305
 
data/lib/aws-sdk-sts.rb CHANGED
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-sts/customizations'
50
50
  # @!group service
51
51
  module Aws::STS
52
52
 
53
- GEM_VERSION = '3.131.0'
53
+ GEM_VERSION = '3.158.1'
54
54
 
55
55
  end
@@ -80,18 +80,18 @@ bytes in the body.
80
80
  context.http_request.body,
81
81
  callback
82
82
  )
83
- add_event_listeners(context)
83
+ @handler.call(context).tap do
84
+ unwrap_callback_body(context)
85
+ end
86
+ else
87
+ @handler.call(context)
84
88
  end
85
- @handler.call(context)
86
89
  end
87
90
 
88
- def add_event_listeners(context)
89
- # unwrap the request body as soon as we start receiving a response
90
- context.http_response.on_headers do
91
- body = context.http_request.body
92
- if body.is_a? ReadCallbackIO
93
- context.http_request.body = body.io
94
- end
91
+ def unwrap_callback_body(context)
92
+ body = context.http_request.body
93
+ if body.is_a? ReadCallbackIO
94
+ context.http_request.body = body.io
95
95
  end
96
96
  end
97
97
  end