aws-sdk-core 3.168.4 → 3.190.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +231 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +4 -4
- data/lib/aws-sdk-core/client_stubs.rb +15 -12
- data/lib/aws-sdk-core/credential_provider.rb +3 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +2 -1
- data/lib/aws-sdk-core/ecs_credentials.rb +177 -53
- data/lib/aws-sdk-core/endpoints/condition.rb +5 -0
- data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +5 -1
- data/lib/aws-sdk-core/endpoints/error_rule.rb +5 -0
- data/lib/aws-sdk-core/endpoints/function.rb +5 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +13 -9
- data/lib/aws-sdk-core/endpoints/reference.rb +5 -0
- data/lib/aws-sdk-core/endpoints/rule.rb +5 -0
- data/lib/aws-sdk-core/endpoints/rule_set.rb +5 -0
- data/lib/aws-sdk-core/endpoints/rules_provider.rb +5 -0
- data/lib/aws-sdk-core/endpoints/templater.rb +6 -0
- data/lib/aws-sdk-core/endpoints/tree_rule.rb +5 -0
- data/lib/aws-sdk-core/endpoints/url.rb +1 -0
- data/lib/aws-sdk-core/endpoints.rb +6 -2
- data/lib/aws-sdk-core/errors.rb +1 -1
- data/lib/aws-sdk-core/ini_parser.rb +7 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +52 -30
- data/lib/aws-sdk-core/json/error_handler.rb +15 -5
- data/lib/aws-sdk-core/json/handler.rb +8 -1
- data/lib/aws-sdk-core/json/parser.rb +27 -2
- data/lib/aws-sdk-core/log/formatter.rb +6 -0
- data/lib/aws-sdk-core/pageable_response.rb +3 -1
- data/lib/aws-sdk-core/param_validator.rb +2 -2
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +5 -3
- data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +109 -33
- data/lib/aws-sdk-core/plugins/request_compression.rb +217 -0
- data/lib/aws-sdk-core/plugins/sign.rb +16 -10
- data/lib/aws-sdk-core/plugins/user_agent.rb +117 -14
- data/lib/aws-sdk-core/refreshing_credentials.rb +12 -12
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +43 -29
- data/lib/aws-sdk-core/shared_config.rb +48 -18
- data/lib/aws-sdk-core/sso_credentials.rb +1 -1
- data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
- data/lib/aws-sdk-core/waiters/poller.rb +4 -2
- data/lib/aws-sdk-core/xml/parser/engines/oga.rb +2 -0
- data/lib/aws-sdk-sso/client.rb +21 -1
- data/lib/aws-sdk-sso/endpoint_provider.rb +41 -96
- data/lib/aws-sdk-sso/endpoints.rb +1 -0
- data/lib/aws-sdk-sso/plugins/endpoints.rb +3 -2
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +358 -29
- data/lib/aws-sdk-ssooidc/client_api.rb +56 -1
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +41 -95
- data/lib/aws-sdk-ssooidc/endpoints.rb +15 -0
- data/lib/aws-sdk-ssooidc/errors.rb +31 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +5 -2
- data/lib/aws-sdk-ssooidc/types.rb +302 -49
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +158 -122
- data/lib/aws-sdk-sts/client_api.rb +12 -1
- data/lib/aws-sdk-sts/endpoint_provider.rb +96 -213
- data/lib/aws-sdk-sts/endpoints.rb +1 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +3 -2
- data/lib/aws-sdk-sts/presigner.rb +1 -1
- data/lib/aws-sdk-sts/types.rb +49 -11
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/configuration.rb +0 -4
- data/lib/seahorse/client/h2/connection.rb +10 -6
- data/lib/seahorse/client/net_http/patches.rb +1 -4
- data/lib/seahorse/client/plugins/h2.rb +3 -3
- data/lib/seahorse/client/plugins/request_callback.rb +31 -0
- data/lib/seahorse/client/response.rb +6 -0
- data/lib/seahorse/model/operation.rb +3 -0
- metadata +13 -12
@@ -28,6 +28,7 @@ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
|
+
require 'aws-sdk-core/plugins/request_compression.rb'
|
31
32
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
33
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
34
|
require 'aws-sdk-core/plugins/sign.rb'
|
@@ -77,6 +78,7 @@ module Aws::SSOOIDC
|
|
77
78
|
add_plugin(Aws::Plugins::TransferEncoding)
|
78
79
|
add_plugin(Aws::Plugins::HttpChecksum)
|
79
80
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
81
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
80
82
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
83
|
add_plugin(Aws::Plugins::RecursionDetection)
|
82
84
|
add_plugin(Aws::Plugins::Sign)
|
@@ -190,6 +192,10 @@ module Aws::SSOOIDC
|
|
190
192
|
# Set to true to disable SDK automatically adding host prefix
|
191
193
|
# to default service endpoint when available.
|
192
194
|
#
|
195
|
+
# @option options [Boolean] :disable_request_compression (false)
|
196
|
+
# When set to 'true' the request body will not be compressed
|
197
|
+
# for supported operations.
|
198
|
+
#
|
193
199
|
# @option options [String] :endpoint
|
194
200
|
# The client endpoint is normally constructed from the `:region`
|
195
201
|
# option. You should only configure an `:endpoint` when connecting
|
@@ -210,6 +216,10 @@ module Aws::SSOOIDC
|
|
210
216
|
# @option options [Boolean] :endpoint_discovery (false)
|
211
217
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
212
218
|
#
|
219
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
220
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
221
|
+
# variables and the shared configuration file.
|
222
|
+
#
|
213
223
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
214
224
|
# The log formatter.
|
215
225
|
#
|
@@ -230,6 +240,11 @@ module Aws::SSOOIDC
|
|
230
240
|
# Used when loading credentials from the shared credentials file
|
231
241
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
232
242
|
#
|
243
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
244
|
+
# The minimum size in bytes that triggers compression for request
|
245
|
+
# bodies. The value must be non-negative integer value between 0
|
246
|
+
# and 10485780 bytes inclusive.
|
247
|
+
#
|
233
248
|
# @option options [Proc] :retry_backoff
|
234
249
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
235
250
|
# This option is only used in the `legacy` retry mode.
|
@@ -275,6 +290,11 @@ module Aws::SSOOIDC
|
|
275
290
|
# in the future.
|
276
291
|
#
|
277
292
|
#
|
293
|
+
# @option options [String] :sdk_ua_app_id
|
294
|
+
# A unique and opaque application ID that is appended to the
|
295
|
+
# User-Agent header as app/<sdk_ua_app_id>. It should have a
|
296
|
+
# maximum length of 50.
|
297
|
+
#
|
278
298
|
# @option options [String] :secret_access_key
|
279
299
|
#
|
280
300
|
# @option options [String] :session_token
|
@@ -368,61 +388,64 @@ module Aws::SSOOIDC
|
|
368
388
|
|
369
389
|
# @!group API Operations
|
370
390
|
|
371
|
-
# Creates and returns
|
372
|
-
# access token
|
373
|
-
#
|
391
|
+
# Creates and returns access and refresh tokens for clients that are
|
392
|
+
# authenticated using client secrets. The access token can be used to
|
393
|
+
# fetch short-term credentials for the assigned AWS accounts or to
|
394
|
+
# access application APIs using `bearer` authentication.
|
374
395
|
#
|
375
396
|
# @option params [required, String] :client_id
|
376
|
-
# The unique identifier string for
|
377
|
-
# from the
|
397
|
+
# The unique identifier string for the client or application. This value
|
398
|
+
# comes from the result of the RegisterClient API.
|
378
399
|
#
|
379
400
|
# @option params [required, String] :client_secret
|
380
401
|
# A secret string generated for the client. This value should come from
|
381
402
|
# the persisted result of the RegisterClient API.
|
382
403
|
#
|
383
404
|
# @option params [required, String] :grant_type
|
384
|
-
# Supports
|
385
|
-
#
|
386
|
-
#
|
405
|
+
# Supports the following OAuth grant types: Device Code and Refresh
|
406
|
+
# Token. Specify either of the following values, depending on the grant
|
407
|
+
# type that you want:
|
408
|
+
#
|
409
|
+
# * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
|
387
410
|
#
|
388
|
-
#
|
411
|
+
# * Refresh Token - `refresh_token`
|
389
412
|
#
|
390
413
|
# For information about how to obtain the device code, see the
|
391
414
|
# StartDeviceAuthorization topic.
|
392
415
|
#
|
393
416
|
# @option params [String] :device_code
|
394
|
-
# Used only when calling this API for the
|
395
|
-
# short-term code is used to identify this
|
396
|
-
#
|
397
|
-
# StartDeviceAuthorization API.
|
417
|
+
# Used only when calling this API for the Device Code grant type. This
|
418
|
+
# short-term code is used to identify this authorization request. This
|
419
|
+
# comes from the result of the StartDeviceAuthorization API.
|
398
420
|
#
|
399
421
|
# @option params [String] :code
|
400
|
-
#
|
401
|
-
#
|
402
|
-
#
|
422
|
+
# Used only when calling this API for the Authorization Code grant type.
|
423
|
+
# The short-term code is used to identify this authorization request.
|
424
|
+
# This grant type is currently unsupported for the CreateToken API.
|
403
425
|
#
|
404
426
|
# @option params [String] :refresh_token
|
405
|
-
#
|
427
|
+
# Used only when calling this API for the Refresh Token grant type. This
|
428
|
+
# token is used to refresh short-term tokens, such as the access token,
|
429
|
+
# that might expire.
|
430
|
+
#
|
406
431
|
# For more information about the features and limitations of the current
|
407
432
|
# IAM Identity Center OIDC implementation, see *Considerations for Using
|
408
433
|
# this Guide* in the [IAM Identity Center OIDC API Reference][1].
|
409
434
|
#
|
410
|
-
# The token used to obtain an access token in the event that the access
|
411
|
-
# token is invalid or expired.
|
412
|
-
#
|
413
435
|
#
|
414
436
|
#
|
415
437
|
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
|
416
438
|
#
|
417
439
|
# @option params [Array<String>] :scope
|
418
|
-
# The list of scopes
|
419
|
-
#
|
420
|
-
#
|
440
|
+
# The list of scopes for which authorization is requested. The access
|
441
|
+
# token that is issued is limited to the scopes that are granted. If
|
442
|
+
# this value is not specified, IAM Identity Center authorizes all scopes
|
443
|
+
# that are configured for the client during the call to RegisterClient.
|
421
444
|
#
|
422
445
|
# @option params [String] :redirect_uri
|
423
|
-
#
|
424
|
-
#
|
425
|
-
#
|
446
|
+
# Used only when calling this API for the Authorization Code grant type.
|
447
|
+
# This value specifies the location of the client or application that
|
448
|
+
# has registered to receive the authorization code.
|
426
449
|
#
|
427
450
|
# @return [Types::CreateTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
428
451
|
#
|
@@ -432,6 +455,44 @@ module Aws::SSOOIDC
|
|
432
455
|
# * {Types::CreateTokenResponse#refresh_token #refresh_token} => String
|
433
456
|
# * {Types::CreateTokenResponse#id_token #id_token} => String
|
434
457
|
#
|
458
|
+
#
|
459
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Device Code grant with Secret authentication
|
460
|
+
#
|
461
|
+
# resp = client.create_token({
|
462
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
463
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
464
|
+
# device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
|
465
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:device-code",
|
466
|
+
# })
|
467
|
+
#
|
468
|
+
# resp.to_h outputs the following:
|
469
|
+
# {
|
470
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
471
|
+
# expires_in: 1579729529,
|
472
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
473
|
+
# token_type: "Bearer",
|
474
|
+
# }
|
475
|
+
#
|
476
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with Secret authentication
|
477
|
+
#
|
478
|
+
# resp = client.create_token({
|
479
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
480
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
481
|
+
# grant_type: "refresh_token",
|
482
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
483
|
+
# scope: [
|
484
|
+
# "codewhisperer:completions",
|
485
|
+
# ],
|
486
|
+
# })
|
487
|
+
#
|
488
|
+
# resp.to_h outputs the following:
|
489
|
+
# {
|
490
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
491
|
+
# expires_in: 1579729529,
|
492
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
493
|
+
# token_type: "Bearer",
|
494
|
+
# }
|
495
|
+
#
|
435
496
|
# @example Request syntax with placeholder values
|
436
497
|
#
|
437
498
|
# resp = client.create_token({
|
@@ -462,6 +523,234 @@ module Aws::SSOOIDC
|
|
462
523
|
req.send_request(options)
|
463
524
|
end
|
464
525
|
|
526
|
+
# Creates and returns access and refresh tokens for clients and
|
527
|
+
# applications that are authenticated using IAM entities. The access
|
528
|
+
# token can be used to fetch short-term credentials for the assigned AWS
|
529
|
+
# accounts or to access application APIs using `bearer` authentication.
|
530
|
+
#
|
531
|
+
# @option params [required, String] :client_id
|
532
|
+
# The unique identifier string for the client or application. This value
|
533
|
+
# is an application ARN that has OAuth grants configured.
|
534
|
+
#
|
535
|
+
# @option params [required, String] :grant_type
|
536
|
+
# Supports the following OAuth grant types: Authorization Code, Refresh
|
537
|
+
# Token, JWT Bearer, and Token Exchange. Specify one of the following
|
538
|
+
# values, depending on the grant type that you want:
|
539
|
+
#
|
540
|
+
# * Authorization Code - `authorization_code`
|
541
|
+
#
|
542
|
+
# * Refresh Token - `refresh_token`
|
543
|
+
#
|
544
|
+
# * JWT Bearer - `urn:ietf:params:oauth:grant-type:jwt-bearer`
|
545
|
+
#
|
546
|
+
# * Token Exchange - `urn:ietf:params:oauth:grant-type:token-exchange`
|
547
|
+
#
|
548
|
+
# @option params [String] :code
|
549
|
+
# Used only when calling this API for the Authorization Code grant type.
|
550
|
+
# This short-term code is used to identify this authorization request.
|
551
|
+
# The code is obtained through a redirect from IAM Identity Center to a
|
552
|
+
# redirect URI persisted in the Authorization Code GrantOptions for the
|
553
|
+
# application.
|
554
|
+
#
|
555
|
+
# @option params [String] :refresh_token
|
556
|
+
# Used only when calling this API for the Refresh Token grant type. This
|
557
|
+
# token is used to refresh short-term tokens, such as the access token,
|
558
|
+
# that might expire.
|
559
|
+
#
|
560
|
+
# For more information about the features and limitations of the current
|
561
|
+
# IAM Identity Center OIDC implementation, see *Considerations for Using
|
562
|
+
# this Guide* in the [IAM Identity Center OIDC API Reference][1].
|
563
|
+
#
|
564
|
+
#
|
565
|
+
#
|
566
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
|
567
|
+
#
|
568
|
+
# @option params [String] :assertion
|
569
|
+
# Used only when calling this API for the JWT Bearer grant type. This
|
570
|
+
# value specifies the JSON Web Token (JWT) issued by a trusted token
|
571
|
+
# issuer. To authorize a trusted token issuer, configure the JWT Bearer
|
572
|
+
# GrantOptions for the application.
|
573
|
+
#
|
574
|
+
# @option params [Array<String>] :scope
|
575
|
+
# The list of scopes for which authorization is requested. The access
|
576
|
+
# token that is issued is limited to the scopes that are granted. If the
|
577
|
+
# value is not specified, IAM Identity Center authorizes all scopes
|
578
|
+
# configured for the application, including the following default
|
579
|
+
# scopes: `openid`, `aws`, `sts:identity_context`.
|
580
|
+
#
|
581
|
+
# @option params [String] :redirect_uri
|
582
|
+
# Used only when calling this API for the Authorization Code grant type.
|
583
|
+
# This value specifies the location of the client or application that
|
584
|
+
# has registered to receive the authorization code.
|
585
|
+
#
|
586
|
+
# @option params [String] :subject_token
|
587
|
+
# Used only when calling this API for the Token Exchange grant type.
|
588
|
+
# This value specifies the subject of the exchange. The value of the
|
589
|
+
# subject token must be an access token issued by IAM Identity Center to
|
590
|
+
# a different client or application. The access token must have
|
591
|
+
# authorized scopes that indicate the requested application as a target
|
592
|
+
# audience.
|
593
|
+
#
|
594
|
+
# @option params [String] :subject_token_type
|
595
|
+
# Used only when calling this API for the Token Exchange grant type.
|
596
|
+
# This value specifies the type of token that is passed as the subject
|
597
|
+
# of the exchange. The following value is supported:
|
598
|
+
#
|
599
|
+
# * Access Token - `urn:ietf:params:oauth:token-type:access_token`
|
600
|
+
#
|
601
|
+
# @option params [String] :requested_token_type
|
602
|
+
# Used only when calling this API for the Token Exchange grant type.
|
603
|
+
# This value specifies the type of token that the requester can receive.
|
604
|
+
# The following values are supported:
|
605
|
+
#
|
606
|
+
# * Access Token - `urn:ietf:params:oauth:token-type:access_token`
|
607
|
+
#
|
608
|
+
# * Refresh Token - `urn:ietf:params:oauth:token-type:refresh_token`
|
609
|
+
#
|
610
|
+
# @return [Types::CreateTokenWithIAMResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
611
|
+
#
|
612
|
+
# * {Types::CreateTokenWithIAMResponse#access_token #access_token} => String
|
613
|
+
# * {Types::CreateTokenWithIAMResponse#token_type #token_type} => String
|
614
|
+
# * {Types::CreateTokenWithIAMResponse#expires_in #expires_in} => Integer
|
615
|
+
# * {Types::CreateTokenWithIAMResponse#refresh_token #refresh_token} => String
|
616
|
+
# * {Types::CreateTokenWithIAMResponse#id_token #id_token} => String
|
617
|
+
# * {Types::CreateTokenWithIAMResponse#issued_token_type #issued_token_type} => String
|
618
|
+
# * {Types::CreateTokenWithIAMResponse#scope #scope} => Array<String>
|
619
|
+
#
|
620
|
+
#
|
621
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
|
622
|
+
#
|
623
|
+
# resp = client.create_token_with_iam({
|
624
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
625
|
+
# code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzg0In0EXAMPLEAUTHCODE",
|
626
|
+
# grant_type: "authorization_code",
|
627
|
+
# redirect_uri: "https://mywebapp.example/redirect",
|
628
|
+
# scope: [
|
629
|
+
# "openid",
|
630
|
+
# "aws",
|
631
|
+
# "sts:identity_context",
|
632
|
+
# ],
|
633
|
+
# })
|
634
|
+
#
|
635
|
+
# resp.to_h outputs the following:
|
636
|
+
# {
|
637
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
638
|
+
# expires_in: 1579729529,
|
639
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
|
640
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
641
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
642
|
+
# scope: [
|
643
|
+
# "openid",
|
644
|
+
# "aws",
|
645
|
+
# "sts:identity_context",
|
646
|
+
# ],
|
647
|
+
# token_type: "Bearer",
|
648
|
+
# }
|
649
|
+
#
|
650
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with IAM authentication
|
651
|
+
#
|
652
|
+
# resp = client.create_token_with_iam({
|
653
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
654
|
+
# grant_type: "refresh_token",
|
655
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
656
|
+
# })
|
657
|
+
#
|
658
|
+
# resp.to_h outputs the following:
|
659
|
+
# {
|
660
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
661
|
+
# expires_in: 1579729529,
|
662
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
663
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
664
|
+
# scope: [
|
665
|
+
# "openid",
|
666
|
+
# "aws",
|
667
|
+
# "sts:identity_context",
|
668
|
+
# ],
|
669
|
+
# token_type: "Bearer",
|
670
|
+
# }
|
671
|
+
#
|
672
|
+
# @example Example: Call OAuth/OIDC /token endpoint for JWT Bearer grant with IAM authentication
|
673
|
+
#
|
674
|
+
# resp = client.create_token_with_iam({
|
675
|
+
# assertion: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjFMVE16YWtpaGlSbGFfOHoyQkVKVlhlV01xbyJ9.eyJ2ZXIiOiIyLjAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vOTEyMjA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkL3YyLjAiLCJzdWIiOiJBQUFBQUFBQUFBQUFBQUFBQUFBQUFJa3pxRlZyU2FTYUZIeTc4MmJidGFRIiwiYXVkIjoiNmNiMDQwMTgtYTNmNS00NmE3LWI5OTUtOTQwYzc4ZjVhZWYzIiwiZXhwIjoxNTM2MzYxNDExLCJpYXQiOjE1MzYyNzQ3MTEsIm5iZiI6MTUzNjI3NDcxMSwibmFtZSI6IkFiZSBMaW5jb2xuIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQWJlTGlAbWljcm9zb2Z0LmNvbSIsIm9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC02NmYzLTMzMzJlY2E3ZWE4MSIsInRpZCI6IjkxMjIwNDBkLTZjNjctNGM1Yi1iMTEyLTM2YTMwNGI2NmRhZCIsIm5vbmNlIjoiMTIzNTIzIiwiYWlvIjoiRGYyVVZYTDFpeCFsTUNXTVNPSkJjRmF0emNHZnZGR2hqS3Y4cTVnMHg3MzJkUjVNQjVCaXN2R1FPN1lXQnlqZDhpUURMcSFlR2JJRGFreXA1bW5PcmNkcUhlWVNubHRlcFFtUnA2QUlaOGpZIn0.1AFWW-Ck5nROwSlltm7GzZvDwUkqvhSQpm55TQsmVo9Y59cLhRXpvB8n-55HCr9Z6G_31_UbeUkoz612I2j_Sm9FFShSDDjoaLQr54CreGIJvjtmS3EkK9a7SJBbcpL1MpUtlfygow39tFjY7EVNW9plWUvRrTgVk7lYLprvfzw-CIqw3gHC-T7IK_m_xkr08INERBtaecwhTeN4chPC4W3jdmw_lIxzC48YoQ0dB1L9-ImX98Egypfrlbm0IBL5spFzL6JDZIRRJOu8vecJvj1mq-IUhGt0MacxX8jdxYLP-KUu2d9MbNKpCKJuZ7p8gwTL5B7NlUdh_dmSviPWrw",
|
676
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
677
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
678
|
+
# })
|
679
|
+
#
|
680
|
+
# resp.to_h outputs the following:
|
681
|
+
# {
|
682
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
683
|
+
# expires_in: 1579729529,
|
684
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
|
685
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
686
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
687
|
+
# scope: [
|
688
|
+
# "openid",
|
689
|
+
# "aws",
|
690
|
+
# "sts:identity_context",
|
691
|
+
# ],
|
692
|
+
# token_type: "Bearer",
|
693
|
+
# }
|
694
|
+
#
|
695
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Token Exchange grant with IAM authentication
|
696
|
+
#
|
697
|
+
# resp = client.create_token_with_iam({
|
698
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
699
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
|
700
|
+
# requested_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
701
|
+
# subject_token: "aoak-Hig8TUDPNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZDIFFERENTACCESSTOKEN",
|
702
|
+
# subject_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
703
|
+
# })
|
704
|
+
#
|
705
|
+
# resp.to_h outputs the following:
|
706
|
+
# {
|
707
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
708
|
+
# expires_in: 1579729529,
|
709
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
|
710
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
711
|
+
# scope: [
|
712
|
+
# "openid",
|
713
|
+
# "aws",
|
714
|
+
# "sts:identity_context",
|
715
|
+
# ],
|
716
|
+
# token_type: "Bearer",
|
717
|
+
# }
|
718
|
+
#
|
719
|
+
# @example Request syntax with placeholder values
|
720
|
+
#
|
721
|
+
# resp = client.create_token_with_iam({
|
722
|
+
# client_id: "ClientId", # required
|
723
|
+
# grant_type: "GrantType", # required
|
724
|
+
# code: "AuthCode",
|
725
|
+
# refresh_token: "RefreshToken",
|
726
|
+
# assertion: "Assertion",
|
727
|
+
# scope: ["Scope"],
|
728
|
+
# redirect_uri: "URI",
|
729
|
+
# subject_token: "SubjectToken",
|
730
|
+
# subject_token_type: "TokenTypeURI",
|
731
|
+
# requested_token_type: "TokenTypeURI",
|
732
|
+
# })
|
733
|
+
#
|
734
|
+
# @example Response structure
|
735
|
+
#
|
736
|
+
# resp.access_token #=> String
|
737
|
+
# resp.token_type #=> String
|
738
|
+
# resp.expires_in #=> Integer
|
739
|
+
# resp.refresh_token #=> String
|
740
|
+
# resp.id_token #=> String
|
741
|
+
# resp.issued_token_type #=> String
|
742
|
+
# resp.scope #=> Array
|
743
|
+
# resp.scope[0] #=> String
|
744
|
+
#
|
745
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM AWS API Documentation
|
746
|
+
#
|
747
|
+
# @overload create_token_with_iam(params = {})
|
748
|
+
# @param [Hash] params ({})
|
749
|
+
def create_token_with_iam(params = {}, options = {})
|
750
|
+
req = build_request(:create_token_with_iam, params)
|
751
|
+
req.send_request(options)
|
752
|
+
end
|
753
|
+
|
465
754
|
# Registers a client with IAM Identity Center. This allows clients to
|
466
755
|
# initiate device authorization. The output should be persisted for
|
467
756
|
# reuse through many authentication requests.
|
@@ -487,6 +776,26 @@ module Aws::SSOOIDC
|
|
487
776
|
# * {Types::RegisterClientResponse#authorization_endpoint #authorization_endpoint} => String
|
488
777
|
# * {Types::RegisterClientResponse#token_endpoint #token_endpoint} => String
|
489
778
|
#
|
779
|
+
#
|
780
|
+
# @example Example: Call OAuth/OIDC /register-client endpoint
|
781
|
+
#
|
782
|
+
# resp = client.register_client({
|
783
|
+
# client_name: "My IDE Plugin",
|
784
|
+
# client_type: "public",
|
785
|
+
# scopes: [
|
786
|
+
# "sso:account:access",
|
787
|
+
# "codewhisperer:completions",
|
788
|
+
# ],
|
789
|
+
# })
|
790
|
+
#
|
791
|
+
# resp.to_h outputs the following:
|
792
|
+
# {
|
793
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
794
|
+
# client_id_issued_at: 1579725929,
|
795
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
796
|
+
# client_secret_expires_at: 1587584729,
|
797
|
+
# }
|
798
|
+
#
|
490
799
|
# @example Request syntax with placeholder values
|
491
800
|
#
|
492
801
|
# resp = client.register_client({
|
@@ -526,8 +835,9 @@ module Aws::SSOOIDC
|
|
526
835
|
# come from the persisted result of the RegisterClient API operation.
|
527
836
|
#
|
528
837
|
# @option params [required, String] :start_url
|
529
|
-
# The URL for the
|
530
|
-
# the
|
838
|
+
# The URL for the Amazon Web Services access portal. For more
|
839
|
+
# information, see [Using the Amazon Web Services access portal][1] in
|
840
|
+
# the *IAM Identity Center User Guide*.
|
531
841
|
#
|
532
842
|
#
|
533
843
|
#
|
@@ -542,6 +852,25 @@ module Aws::SSOOIDC
|
|
542
852
|
# * {Types::StartDeviceAuthorizationResponse#expires_in #expires_in} => Integer
|
543
853
|
# * {Types::StartDeviceAuthorizationResponse#interval #interval} => Integer
|
544
854
|
#
|
855
|
+
#
|
856
|
+
# @example Example: Call OAuth/OIDC /start-device-authorization endpoint
|
857
|
+
#
|
858
|
+
# resp = client.start_device_authorization({
|
859
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
860
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
861
|
+
# start_url: "https://identitycenter.amazonaws.com/ssoins-111111111111",
|
862
|
+
# })
|
863
|
+
#
|
864
|
+
# resp.to_h outputs the following:
|
865
|
+
# {
|
866
|
+
# device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
|
867
|
+
# expires_in: 1579729529,
|
868
|
+
# interval: 1,
|
869
|
+
# user_code: "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
|
870
|
+
# verification_uri: "https://device.sso.us-west-2.amazonaws.com",
|
871
|
+
# verification_uri_complete: "https://device.sso.us-west-2.amazonaws.com?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
|
872
|
+
# }
|
873
|
+
#
|
545
874
|
# @example Request syntax with placeholder values
|
546
875
|
#
|
547
876
|
# resp = client.start_device_authorization({
|
@@ -581,7 +910,7 @@ module Aws::SSOOIDC
|
|
581
910
|
params: params,
|
582
911
|
config: config)
|
583
912
|
context[:gem_name] = 'aws-sdk-core'
|
584
|
-
context[:gem_version] = '3.
|
913
|
+
context[:gem_version] = '3.190.3'
|
585
914
|
Seahorse::Client::Request.new(handlers, context)
|
586
915
|
end
|
587
916
|
|
@@ -15,6 +15,7 @@ module Aws::SSOOIDC
|
|
15
15
|
|
16
16
|
AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
|
17
17
|
AccessToken = Shapes::StringShape.new(name: 'AccessToken')
|
18
|
+
Assertion = Shapes::StringShape.new(name: 'Assertion')
|
18
19
|
AuthCode = Shapes::StringShape.new(name: 'AuthCode')
|
19
20
|
AuthorizationPendingException = Shapes::StructureShape.new(name: 'AuthorizationPendingException')
|
20
21
|
ClientId = Shapes::StringShape.new(name: 'ClientId')
|
@@ -23,6 +24,8 @@ module Aws::SSOOIDC
|
|
23
24
|
ClientType = Shapes::StringShape.new(name: 'ClientType')
|
24
25
|
CreateTokenRequest = Shapes::StructureShape.new(name: 'CreateTokenRequest')
|
25
26
|
CreateTokenResponse = Shapes::StructureShape.new(name: 'CreateTokenResponse')
|
27
|
+
CreateTokenWithIAMRequest = Shapes::StructureShape.new(name: 'CreateTokenWithIAMRequest')
|
28
|
+
CreateTokenWithIAMResponse = Shapes::StructureShape.new(name: 'CreateTokenWithIAMResponse')
|
26
29
|
DeviceCode = Shapes::StringShape.new(name: 'DeviceCode')
|
27
30
|
Error = Shapes::StringShape.new(name: 'Error')
|
28
31
|
ErrorDescription = Shapes::StringShape.new(name: 'ErrorDescription')
|
@@ -36,9 +39,12 @@ module Aws::SSOOIDC
|
|
36
39
|
InvalidClientMetadataException = Shapes::StructureShape.new(name: 'InvalidClientMetadataException')
|
37
40
|
InvalidGrantException = Shapes::StructureShape.new(name: 'InvalidGrantException')
|
38
41
|
InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
|
42
|
+
InvalidRequestRegionException = Shapes::StructureShape.new(name: 'InvalidRequestRegionException')
|
39
43
|
InvalidScopeException = Shapes::StructureShape.new(name: 'InvalidScopeException')
|
44
|
+
Location = Shapes::StringShape.new(name: 'Location')
|
40
45
|
LongTimeStampType = Shapes::IntegerShape.new(name: 'LongTimeStampType')
|
41
46
|
RefreshToken = Shapes::StringShape.new(name: 'RefreshToken')
|
47
|
+
Region = Shapes::StringShape.new(name: 'Region')
|
42
48
|
RegisterClientRequest = Shapes::StructureShape.new(name: 'RegisterClientRequest')
|
43
49
|
RegisterClientResponse = Shapes::StructureShape.new(name: 'RegisterClientResponse')
|
44
50
|
Scope = Shapes::StringShape.new(name: 'Scope')
|
@@ -46,7 +52,9 @@ module Aws::SSOOIDC
|
|
46
52
|
SlowDownException = Shapes::StructureShape.new(name: 'SlowDownException')
|
47
53
|
StartDeviceAuthorizationRequest = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationRequest')
|
48
54
|
StartDeviceAuthorizationResponse = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationResponse')
|
55
|
+
SubjectToken = Shapes::StringShape.new(name: 'SubjectToken')
|
49
56
|
TokenType = Shapes::StringShape.new(name: 'TokenType')
|
57
|
+
TokenTypeURI = Shapes::StringShape.new(name: 'TokenTypeURI')
|
50
58
|
URI = Shapes::StringShape.new(name: 'URI')
|
51
59
|
UnauthorizedClientException = Shapes::StructureShape.new(name: 'UnauthorizedClientException')
|
52
60
|
UnsupportedGrantTypeException = Shapes::StructureShape.new(name: 'UnsupportedGrantTypeException')
|
@@ -77,6 +85,27 @@ module Aws::SSOOIDC
|
|
77
85
|
CreateTokenResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
|
78
86
|
CreateTokenResponse.struct_class = Types::CreateTokenResponse
|
79
87
|
|
88
|
+
CreateTokenWithIAMRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
|
89
|
+
CreateTokenWithIAMRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: GrantType, required: true, location_name: "grantType"))
|
90
|
+
CreateTokenWithIAMRequest.add_member(:code, Shapes::ShapeRef.new(shape: AuthCode, location_name: "code"))
|
91
|
+
CreateTokenWithIAMRequest.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
|
92
|
+
CreateTokenWithIAMRequest.add_member(:assertion, Shapes::ShapeRef.new(shape: Assertion, location_name: "assertion"))
|
93
|
+
CreateTokenWithIAMRequest.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
|
94
|
+
CreateTokenWithIAMRequest.add_member(:redirect_uri, Shapes::ShapeRef.new(shape: URI, location_name: "redirectUri"))
|
95
|
+
CreateTokenWithIAMRequest.add_member(:subject_token, Shapes::ShapeRef.new(shape: SubjectToken, location_name: "subjectToken"))
|
96
|
+
CreateTokenWithIAMRequest.add_member(:subject_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "subjectTokenType"))
|
97
|
+
CreateTokenWithIAMRequest.add_member(:requested_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "requestedTokenType"))
|
98
|
+
CreateTokenWithIAMRequest.struct_class = Types::CreateTokenWithIAMRequest
|
99
|
+
|
100
|
+
CreateTokenWithIAMResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessToken, location_name: "accessToken"))
|
101
|
+
CreateTokenWithIAMResponse.add_member(:token_type, Shapes::ShapeRef.new(shape: TokenType, location_name: "tokenType"))
|
102
|
+
CreateTokenWithIAMResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: ExpirationInSeconds, location_name: "expiresIn"))
|
103
|
+
CreateTokenWithIAMResponse.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
|
104
|
+
CreateTokenWithIAMResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
|
105
|
+
CreateTokenWithIAMResponse.add_member(:issued_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "issuedTokenType"))
|
106
|
+
CreateTokenWithIAMResponse.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
|
107
|
+
CreateTokenWithIAMResponse.struct_class = Types::CreateTokenWithIAMResponse
|
108
|
+
|
80
109
|
ExpiredTokenException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
|
81
110
|
ExpiredTokenException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
82
111
|
ExpiredTokenException.struct_class = Types::ExpiredTokenException
|
@@ -101,6 +130,12 @@ module Aws::SSOOIDC
|
|
101
130
|
InvalidRequestException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
102
131
|
InvalidRequestException.struct_class = Types::InvalidRequestException
|
103
132
|
|
133
|
+
InvalidRequestRegionException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
|
134
|
+
InvalidRequestRegionException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
135
|
+
InvalidRequestRegionException.add_member(:endpoint, Shapes::ShapeRef.new(shape: Location, location_name: "endpoint"))
|
136
|
+
InvalidRequestRegionException.add_member(:region, Shapes::ShapeRef.new(shape: Region, location_name: "region"))
|
137
|
+
InvalidRequestRegionException.struct_class = Types::InvalidRequestRegionException
|
138
|
+
|
104
139
|
InvalidScopeException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
|
105
140
|
InvalidScopeException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
106
141
|
InvalidScopeException.struct_class = Types::InvalidScopeException
|
@@ -160,7 +195,7 @@ module Aws::SSOOIDC
|
|
160
195
|
"serviceFullName" => "AWS SSO OIDC",
|
161
196
|
"serviceId" => "SSO OIDC",
|
162
197
|
"signatureVersion" => "v4",
|
163
|
-
"signingName" => "
|
198
|
+
"signingName" => "sso-oauth",
|
164
199
|
"uid" => "sso-oidc-2019-06-10",
|
165
200
|
}
|
166
201
|
|
@@ -184,6 +219,26 @@ module Aws::SSOOIDC
|
|
184
219
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
185
220
|
end)
|
186
221
|
|
222
|
+
api.add_operation(:create_token_with_iam, Seahorse::Model::Operation.new.tap do |o|
|
223
|
+
o.name = "CreateTokenWithIAM"
|
224
|
+
o.http_method = "POST"
|
225
|
+
o.http_request_uri = "/token?aws_iam=t"
|
226
|
+
o.input = Shapes::ShapeRef.new(shape: CreateTokenWithIAMRequest)
|
227
|
+
o.output = Shapes::ShapeRef.new(shape: CreateTokenWithIAMResponse)
|
228
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
229
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidClientException)
|
230
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidGrantException)
|
231
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedClientException)
|
232
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedGrantTypeException)
|
233
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
|
234
|
+
o.errors << Shapes::ShapeRef.new(shape: AuthorizationPendingException)
|
235
|
+
o.errors << Shapes::ShapeRef.new(shape: SlowDownException)
|
236
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
237
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
|
238
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
239
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestRegionException)
|
240
|
+
end)
|
241
|
+
|
187
242
|
api.add_operation(:register_client, Seahorse::Model::Operation.new.tap do |o|
|
188
243
|
o.name = "RegisterClient"
|
189
244
|
o.http_method = "POST"
|