aws-sdk-core 3.171.1 → 3.199.0
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 +363 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +4 -4
- data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
- data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
- data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
- data/lib/aws-sdk-core/cbor/cbor_engine.rb +19 -0
- data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
- data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
- data/lib/aws-sdk-core/cbor.rb +106 -0
- data/lib/aws-sdk-core/client_stubs.rb +18 -14
- data/lib/aws-sdk-core/credential_provider.rb +4 -1
- data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
- data/lib/aws-sdk-core/ecs_credentials.rb +78 -11
- data/lib/aws-sdk-core/endpoints/matchers.rb +18 -10
- data/lib/aws-sdk-core/endpoints.rb +6 -2
- data/lib/aws-sdk-core/error_handler.rb +41 -0
- data/lib/aws-sdk-core/errors.rb +3 -3
- data/lib/aws-sdk-core/event_emitter.rb +0 -16
- data/lib/aws-sdk-core/ini_parser.rb +7 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +55 -32
- data/lib/aws-sdk-core/json/builder.rb +8 -1
- data/lib/aws-sdk-core/json/error_handler.rb +15 -10
- data/lib/aws-sdk-core/json/handler.rb +12 -6
- data/lib/aws-sdk-core/json/json_engine.rb +3 -1
- data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
- data/lib/aws-sdk-core/json/parser.rb +33 -3
- data/lib/aws-sdk-core/json.rb +43 -14
- data/lib/aws-sdk-core/log/formatter.rb +6 -0
- data/lib/aws-sdk-core/lru_cache.rb +75 -0
- data/lib/aws-sdk-core/pageable_response.rb +3 -1
- data/lib/aws-sdk-core/param_validator.rb +9 -4
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +5 -3
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -0
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +2 -0
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
- data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
- data/lib/aws-sdk-core/plugins/logging.rb +2 -0
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
- data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
- data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +109 -33
- data/lib/aws-sdk-core/plugins/request_compression.rb +226 -0
- data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
- data/lib/aws-sdk-core/plugins/sign.rb +24 -13
- data/lib/aws-sdk-core/plugins/stub_responses.rb +1 -0
- data/lib/aws-sdk-core/plugins/user_agent.rb +152 -14
- data/lib/aws-sdk-core/process_credentials.rb +45 -27
- data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
- data/lib/aws-sdk-core/query/handler.rb +4 -4
- data/lib/aws-sdk-core/query/param_builder.rb +2 -2
- data/lib/aws-sdk-core/query.rb +2 -1
- data/lib/aws-sdk-core/refreshing_credentials.rb +12 -12
- data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/body.rb +32 -5
- data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
- data/lib/aws-sdk-core/rest/response/body.rb +15 -1
- data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
- data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
- data/lib/aws-sdk-core/rest.rb +1 -0
- data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
- data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +45 -0
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +84 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +74 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
- data/lib/aws-sdk-core/rpc_v2.rb +6 -0
- 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/protocols/rpc_v2.rb +41 -0
- data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
- data/lib/aws-sdk-core/util.rb +39 -0
- data/lib/aws-sdk-core/waiters/poller.rb +4 -2
- data/lib/aws-sdk-core/xml/builder.rb +17 -9
- data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
- data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
- data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
- data/lib/aws-sdk-core/xml/parser.rb +2 -6
- data/lib/aws-sdk-core.rb +7 -2
- data/lib/aws-sdk-sso/client.rb +94 -46
- data/lib/aws-sdk-sso/endpoint_provider.rb +30 -24
- data/lib/aws-sdk-sso/endpoints.rb +1 -0
- data/lib/aws-sdk-sso/plugins/endpoints.rb +4 -2
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +479 -74
- data/lib/aws-sdk-ssooidc/client_api.rb +78 -1
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +30 -24
- data/lib/aws-sdk-ssooidc/endpoints.rb +15 -0
- data/lib/aws-sdk-ssooidc/errors.rb +52 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +6 -2
- data/lib/aws-sdk-ssooidc/types.rb +372 -51
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +219 -157
- data/lib/aws-sdk-sts/client_api.rb +20 -9
- data/lib/aws-sdk-sts/endpoint_provider.rb +81 -78
- data/lib/aws-sdk-sts/endpoints.rb +1 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +4 -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/async_base.rb +1 -1
- data/lib/seahorse/client/async_response.rb +19 -0
- data/lib/seahorse/client/base.rb +18 -7
- data/lib/seahorse/client/configuration.rb +0 -4
- data/lib/seahorse/client/h2/handler.rb +1 -0
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +3 -9
- data/lib/seahorse/client/net_http/patches.rb +1 -4
- data/lib/seahorse/client/plugin.rb +9 -0
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/h2.rb +3 -3
- data/lib/seahorse/client/plugins/net_http.rb +48 -16
- 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
- data/lib/seahorse/model/shapes.rb +2 -2
- data/sig/aws-sdk-core/client_stubs.rbs +10 -0
- data/sig/aws-sdk-core/errors.rbs +22 -0
- data/sig/aws-sdk-core/resources/collection.rbs +21 -0
- data/sig/aws-sdk-core/structure.rbs +4 -0
- data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
- data/sig/aws-sdk-core.rbs +7 -0
- data/sig/seahorse/client/base.rbs +25 -0
- data/sig/seahorse/client/handler_builder.rbs +16 -0
- data/sig/seahorse/client/response.rbs +61 -0
- metadata +44 -17
- /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
|
@@ -22,12 +22,14 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
|
|
22
22
|
require 'aws-sdk-core/plugins/response_paging.rb'
|
|
23
23
|
require 'aws-sdk-core/plugins/stub_responses.rb'
|
|
24
24
|
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
|
25
|
+
require 'aws-sdk-core/plugins/invocation_id.rb'
|
|
25
26
|
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
|
26
27
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
27
28
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
|
28
29
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
|
29
30
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
|
30
31
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
|
32
|
+
require 'aws-sdk-core/plugins/request_compression.rb'
|
|
31
33
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
|
32
34
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
|
33
35
|
require 'aws-sdk-core/plugins/sign.rb'
|
|
@@ -71,12 +73,14 @@ module Aws::SSOOIDC
|
|
|
71
73
|
add_plugin(Aws::Plugins::ResponsePaging)
|
|
72
74
|
add_plugin(Aws::Plugins::StubResponses)
|
|
73
75
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
|
76
|
+
add_plugin(Aws::Plugins::InvocationId)
|
|
74
77
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
|
75
78
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
|
76
79
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
|
77
80
|
add_plugin(Aws::Plugins::TransferEncoding)
|
|
78
81
|
add_plugin(Aws::Plugins::HttpChecksum)
|
|
79
82
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
|
83
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
|
80
84
|
add_plugin(Aws::Plugins::DefaultsMode)
|
|
81
85
|
add_plugin(Aws::Plugins::RecursionDetection)
|
|
82
86
|
add_plugin(Aws::Plugins::Sign)
|
|
@@ -85,6 +89,11 @@ module Aws::SSOOIDC
|
|
|
85
89
|
|
|
86
90
|
# @overload initialize(options)
|
|
87
91
|
# @param [Hash] options
|
|
92
|
+
#
|
|
93
|
+
# @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
|
|
94
|
+
# A list of plugins to apply to the client. Each plugin is either a
|
|
95
|
+
# class name or an instance of a plugin class.
|
|
96
|
+
#
|
|
88
97
|
# @option options [required, Aws::CredentialProvider] :credentials
|
|
89
98
|
# Your AWS credentials. This can be an instance of any one of the
|
|
90
99
|
# following classes:
|
|
@@ -190,10 +199,20 @@ module Aws::SSOOIDC
|
|
|
190
199
|
# Set to true to disable SDK automatically adding host prefix
|
|
191
200
|
# to default service endpoint when available.
|
|
192
201
|
#
|
|
193
|
-
# @option options [
|
|
194
|
-
#
|
|
195
|
-
#
|
|
196
|
-
#
|
|
202
|
+
# @option options [Boolean] :disable_request_compression (false)
|
|
203
|
+
# When set to 'true' the request body will not be compressed
|
|
204
|
+
# for supported operations.
|
|
205
|
+
#
|
|
206
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
|
207
|
+
# Normally you should not configure the `:endpoint` option
|
|
208
|
+
# directly. This is normally constructed from the `:region`
|
|
209
|
+
# option. Configuring `:endpoint` is normally reserved for
|
|
210
|
+
# connecting to test or custom endpoints. The endpoint should
|
|
211
|
+
# be a URI formatted like:
|
|
212
|
+
#
|
|
213
|
+
# 'http://example.com'
|
|
214
|
+
# 'https://example.com'
|
|
215
|
+
# 'http://example.com:123'
|
|
197
216
|
#
|
|
198
217
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
|
199
218
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
|
@@ -210,6 +229,10 @@ module Aws::SSOOIDC
|
|
|
210
229
|
# @option options [Boolean] :endpoint_discovery (false)
|
|
211
230
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
|
212
231
|
#
|
|
232
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
|
233
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
|
234
|
+
# variables and the shared configuration file.
|
|
235
|
+
#
|
|
213
236
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
|
214
237
|
# The log formatter.
|
|
215
238
|
#
|
|
@@ -230,6 +253,11 @@ module Aws::SSOOIDC
|
|
|
230
253
|
# Used when loading credentials from the shared credentials file
|
|
231
254
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
|
232
255
|
#
|
|
256
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
|
257
|
+
# The minimum size in bytes that triggers compression for request
|
|
258
|
+
# bodies. The value must be non-negative integer value between 0
|
|
259
|
+
# and 10485780 bytes inclusive.
|
|
260
|
+
#
|
|
233
261
|
# @option options [Proc] :retry_backoff
|
|
234
262
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
|
235
263
|
# This option is only used in the `legacy` retry mode.
|
|
@@ -274,6 +302,11 @@ module Aws::SSOOIDC
|
|
|
274
302
|
# throttling. This is a provisional mode that may change behavior
|
|
275
303
|
# in the future.
|
|
276
304
|
#
|
|
305
|
+
# @option options [String] :sdk_ua_app_id
|
|
306
|
+
# A unique and opaque application ID that is appended to the
|
|
307
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
|
308
|
+
# maximum length of 50. This variable is sourced from environment
|
|
309
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
|
277
310
|
#
|
|
278
311
|
# @option options [String] :secret_access_key
|
|
279
312
|
#
|
|
@@ -317,50 +350,65 @@ module Aws::SSOOIDC
|
|
|
317
350
|
# @option options [Aws::SSOOIDC::EndpointProvider] :endpoint_provider
|
|
318
351
|
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SSOOIDC::EndpointParameters`
|
|
319
352
|
#
|
|
320
|
-
# @option options [
|
|
321
|
-
#
|
|
322
|
-
#
|
|
323
|
-
#
|
|
324
|
-
#
|
|
325
|
-
#
|
|
326
|
-
#
|
|
327
|
-
#
|
|
328
|
-
#
|
|
329
|
-
#
|
|
330
|
-
#
|
|
331
|
-
# @option options [Float] :
|
|
332
|
-
#
|
|
333
|
-
#
|
|
334
|
-
#
|
|
335
|
-
#
|
|
336
|
-
#
|
|
337
|
-
#
|
|
338
|
-
#
|
|
339
|
-
#
|
|
340
|
-
#
|
|
341
|
-
#
|
|
342
|
-
#
|
|
343
|
-
#
|
|
344
|
-
#
|
|
353
|
+
# @option options [Float] :http_continue_timeout (1)
|
|
354
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
|
355
|
+
# request body. This option has no effect unless the request has "Expect"
|
|
356
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
|
357
|
+
# behaviour. This value can safely be set per request on the session.
|
|
358
|
+
#
|
|
359
|
+
# @option options [Float] :http_idle_timeout (5)
|
|
360
|
+
# The number of seconds a connection is allowed to sit idle before it
|
|
361
|
+
# is considered stale. Stale connections are closed and removed from the
|
|
362
|
+
# pool before making a request.
|
|
363
|
+
#
|
|
364
|
+
# @option options [Float] :http_open_timeout (15)
|
|
365
|
+
# The default number of seconds to wait for response data.
|
|
366
|
+
# This value can safely be set per-request on the session.
|
|
367
|
+
#
|
|
368
|
+
# @option options [URI::HTTP,String] :http_proxy
|
|
369
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
|
370
|
+
#
|
|
371
|
+
# @option options [Float] :http_read_timeout (60)
|
|
372
|
+
# The default number of seconds to wait for response data.
|
|
373
|
+
# This value can safely be set per-request on the session.
|
|
374
|
+
#
|
|
375
|
+
# @option options [Boolean] :http_wire_trace (false)
|
|
376
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
|
377
|
+
#
|
|
378
|
+
# @option options [Proc] :on_chunk_received
|
|
379
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
380
|
+
# of the response body is received. It provides three arguments: the chunk,
|
|
381
|
+
# the number of bytes received, and the total number of
|
|
382
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
|
383
|
+
#
|
|
384
|
+
# @option options [Proc] :on_chunk_sent
|
|
385
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
386
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
|
387
|
+
# the number of bytes read from the body, and the total number of
|
|
388
|
+
# bytes in the body.
|
|
389
|
+
#
|
|
390
|
+
# @option options [Boolean] :raise_response_errors (true)
|
|
391
|
+
# When `true`, response errors are raised.
|
|
392
|
+
#
|
|
393
|
+
# @option options [String] :ssl_ca_bundle
|
|
394
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
|
395
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
|
396
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
|
397
|
+
#
|
|
398
|
+
# @option options [String] :ssl_ca_directory
|
|
399
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
|
400
|
+
# authority files for verifying peer certificates. If you do
|
|
401
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
|
402
|
+
# default will be used if available.
|
|
345
403
|
#
|
|
346
|
-
# @option options [
|
|
347
|
-
#
|
|
404
|
+
# @option options [String] :ssl_ca_store
|
|
405
|
+
# Sets the X509::Store to verify peer certificate.
|
|
348
406
|
#
|
|
349
|
-
# @option options [
|
|
350
|
-
#
|
|
351
|
-
# connection.
|
|
407
|
+
# @option options [Float] :ssl_timeout
|
|
408
|
+
# Sets the SSL timeout in seconds
|
|
352
409
|
#
|
|
353
|
-
# @option options [
|
|
354
|
-
#
|
|
355
|
-
# verifying peer certificates. If you do not pass
|
|
356
|
-
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
|
357
|
-
# will be used if available.
|
|
358
|
-
#
|
|
359
|
-
# @option options [String] :ssl_ca_directory Full path of the
|
|
360
|
-
# directory that contains the unbundled SSL certificate
|
|
361
|
-
# authority files for verifying peer certificates. If you do
|
|
362
|
-
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
|
363
|
-
# system default will be used if available.
|
|
410
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
|
411
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
|
364
412
|
#
|
|
365
413
|
def initialize(*args)
|
|
366
414
|
super
|
|
@@ -368,61 +416,69 @@ module Aws::SSOOIDC
|
|
|
368
416
|
|
|
369
417
|
# @!group API Operations
|
|
370
418
|
|
|
371
|
-
# Creates and returns
|
|
372
|
-
# access token
|
|
373
|
-
#
|
|
419
|
+
# Creates and returns access and refresh tokens for clients that are
|
|
420
|
+
# authenticated using client secrets. The access token can be used to
|
|
421
|
+
# fetch short-term credentials for the assigned AWS accounts or to
|
|
422
|
+
# access application APIs using `bearer` authentication.
|
|
374
423
|
#
|
|
375
424
|
# @option params [required, String] :client_id
|
|
376
|
-
# The unique identifier string for
|
|
377
|
-
# from the
|
|
425
|
+
# The unique identifier string for the client or application. This value
|
|
426
|
+
# comes from the result of the RegisterClient API.
|
|
378
427
|
#
|
|
379
428
|
# @option params [required, String] :client_secret
|
|
380
429
|
# A secret string generated for the client. This value should come from
|
|
381
430
|
# the persisted result of the RegisterClient API.
|
|
382
431
|
#
|
|
383
432
|
# @option params [required, String] :grant_type
|
|
384
|
-
# Supports
|
|
385
|
-
#
|
|
386
|
-
#
|
|
433
|
+
# Supports the following OAuth grant types: Device Code and Refresh
|
|
434
|
+
# Token. Specify either of the following values, depending on the grant
|
|
435
|
+
# type that you want:
|
|
436
|
+
#
|
|
437
|
+
# * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
|
|
387
438
|
#
|
|
388
|
-
#
|
|
439
|
+
# * Refresh Token - `refresh_token`
|
|
389
440
|
#
|
|
390
441
|
# For information about how to obtain the device code, see the
|
|
391
442
|
# StartDeviceAuthorization topic.
|
|
392
443
|
#
|
|
393
444
|
# @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.
|
|
445
|
+
# Used only when calling this API for the Device Code grant type. This
|
|
446
|
+
# short-term code is used to identify this authorization request. This
|
|
447
|
+
# comes from the result of the StartDeviceAuthorization API.
|
|
398
448
|
#
|
|
399
449
|
# @option params [String] :code
|
|
400
|
-
#
|
|
401
|
-
#
|
|
402
|
-
#
|
|
450
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
451
|
+
# The short-term code is used to identify this authorization request.
|
|
452
|
+
# This grant type is currently unsupported for the CreateToken API.
|
|
403
453
|
#
|
|
404
454
|
# @option params [String] :refresh_token
|
|
405
|
-
#
|
|
455
|
+
# Used only when calling this API for the Refresh Token grant type. This
|
|
456
|
+
# token is used to refresh short-term tokens, such as the access token,
|
|
457
|
+
# that might expire.
|
|
458
|
+
#
|
|
406
459
|
# For more information about the features and limitations of the current
|
|
407
460
|
# IAM Identity Center OIDC implementation, see *Considerations for Using
|
|
408
461
|
# this Guide* in the [IAM Identity Center OIDC API Reference][1].
|
|
409
462
|
#
|
|
410
|
-
# The token used to obtain an access token in the event that the access
|
|
411
|
-
# token is invalid or expired.
|
|
412
|
-
#
|
|
413
463
|
#
|
|
414
464
|
#
|
|
415
465
|
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
|
|
416
466
|
#
|
|
417
467
|
# @option params [Array<String>] :scope
|
|
418
|
-
# The list of scopes
|
|
419
|
-
#
|
|
420
|
-
#
|
|
468
|
+
# The list of scopes for which authorization is requested. The access
|
|
469
|
+
# token that is issued is limited to the scopes that are granted. If
|
|
470
|
+
# this value is not specified, IAM Identity Center authorizes all scopes
|
|
471
|
+
# that are configured for the client during the call to RegisterClient.
|
|
421
472
|
#
|
|
422
473
|
# @option params [String] :redirect_uri
|
|
423
|
-
#
|
|
424
|
-
#
|
|
425
|
-
#
|
|
474
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
475
|
+
# This value specifies the location of the client or application that
|
|
476
|
+
# has registered to receive the authorization code.
|
|
477
|
+
#
|
|
478
|
+
# @option params [String] :code_verifier
|
|
479
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
480
|
+
# This value is generated by the client and presented to validate the
|
|
481
|
+
# original code challenge value the client passed at authorization time.
|
|
426
482
|
#
|
|
427
483
|
# @return [Types::CreateTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
428
484
|
#
|
|
@@ -432,6 +488,44 @@ module Aws::SSOOIDC
|
|
|
432
488
|
# * {Types::CreateTokenResponse#refresh_token #refresh_token} => String
|
|
433
489
|
# * {Types::CreateTokenResponse#id_token #id_token} => String
|
|
434
490
|
#
|
|
491
|
+
#
|
|
492
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Device Code grant with Secret authentication
|
|
493
|
+
#
|
|
494
|
+
# resp = client.create_token({
|
|
495
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
496
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
497
|
+
# device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
|
|
498
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:device-code",
|
|
499
|
+
# })
|
|
500
|
+
#
|
|
501
|
+
# resp.to_h outputs the following:
|
|
502
|
+
# {
|
|
503
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
504
|
+
# expires_in: 1579729529,
|
|
505
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
506
|
+
# token_type: "Bearer",
|
|
507
|
+
# }
|
|
508
|
+
#
|
|
509
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with Secret authentication
|
|
510
|
+
#
|
|
511
|
+
# resp = client.create_token({
|
|
512
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
513
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
514
|
+
# grant_type: "refresh_token",
|
|
515
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
516
|
+
# scope: [
|
|
517
|
+
# "codewhisperer:completions",
|
|
518
|
+
# ],
|
|
519
|
+
# })
|
|
520
|
+
#
|
|
521
|
+
# resp.to_h outputs the following:
|
|
522
|
+
# {
|
|
523
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
524
|
+
# expires_in: 1579729529,
|
|
525
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
526
|
+
# token_type: "Bearer",
|
|
527
|
+
# }
|
|
528
|
+
#
|
|
435
529
|
# @example Request syntax with placeholder values
|
|
436
530
|
#
|
|
437
531
|
# resp = client.create_token({
|
|
@@ -443,6 +537,7 @@ module Aws::SSOOIDC
|
|
|
443
537
|
# refresh_token: "RefreshToken",
|
|
444
538
|
# scope: ["Scope"],
|
|
445
539
|
# redirect_uri: "URI",
|
|
540
|
+
# code_verifier: "CodeVerifier",
|
|
446
541
|
# })
|
|
447
542
|
#
|
|
448
543
|
# @example Response structure
|
|
@@ -462,6 +557,241 @@ module Aws::SSOOIDC
|
|
|
462
557
|
req.send_request(options)
|
|
463
558
|
end
|
|
464
559
|
|
|
560
|
+
# Creates and returns access and refresh tokens for clients and
|
|
561
|
+
# applications that are authenticated using IAM entities. The access
|
|
562
|
+
# token can be used to fetch short-term credentials for the assigned
|
|
563
|
+
# Amazon Web Services accounts or to access application APIs using
|
|
564
|
+
# `bearer` authentication.
|
|
565
|
+
#
|
|
566
|
+
# @option params [required, String] :client_id
|
|
567
|
+
# The unique identifier string for the client or application. This value
|
|
568
|
+
# is an application ARN that has OAuth grants configured.
|
|
569
|
+
#
|
|
570
|
+
# @option params [required, String] :grant_type
|
|
571
|
+
# Supports the following OAuth grant types: Authorization Code, Refresh
|
|
572
|
+
# Token, JWT Bearer, and Token Exchange. Specify one of the following
|
|
573
|
+
# values, depending on the grant type that you want:
|
|
574
|
+
#
|
|
575
|
+
# * Authorization Code - `authorization_code`
|
|
576
|
+
#
|
|
577
|
+
# * Refresh Token - `refresh_token`
|
|
578
|
+
#
|
|
579
|
+
# * JWT Bearer - `urn:ietf:params:oauth:grant-type:jwt-bearer`
|
|
580
|
+
#
|
|
581
|
+
# * Token Exchange - `urn:ietf:params:oauth:grant-type:token-exchange`
|
|
582
|
+
#
|
|
583
|
+
# @option params [String] :code
|
|
584
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
585
|
+
# This short-term code is used to identify this authorization request.
|
|
586
|
+
# The code is obtained through a redirect from IAM Identity Center to a
|
|
587
|
+
# redirect URI persisted in the Authorization Code GrantOptions for the
|
|
588
|
+
# application.
|
|
589
|
+
#
|
|
590
|
+
# @option params [String] :refresh_token
|
|
591
|
+
# Used only when calling this API for the Refresh Token grant type. This
|
|
592
|
+
# token is used to refresh short-term tokens, such as the access token,
|
|
593
|
+
# that might expire.
|
|
594
|
+
#
|
|
595
|
+
# For more information about the features and limitations of the current
|
|
596
|
+
# IAM Identity Center OIDC implementation, see *Considerations for Using
|
|
597
|
+
# this Guide* in the [IAM Identity Center OIDC API Reference][1].
|
|
598
|
+
#
|
|
599
|
+
#
|
|
600
|
+
#
|
|
601
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
|
|
602
|
+
#
|
|
603
|
+
# @option params [String] :assertion
|
|
604
|
+
# Used only when calling this API for the JWT Bearer grant type. This
|
|
605
|
+
# value specifies the JSON Web Token (JWT) issued by a trusted token
|
|
606
|
+
# issuer. To authorize a trusted token issuer, configure the JWT Bearer
|
|
607
|
+
# GrantOptions for the application.
|
|
608
|
+
#
|
|
609
|
+
# @option params [Array<String>] :scope
|
|
610
|
+
# The list of scopes for which authorization is requested. The access
|
|
611
|
+
# token that is issued is limited to the scopes that are granted. If the
|
|
612
|
+
# value is not specified, IAM Identity Center authorizes all scopes
|
|
613
|
+
# configured for the application, including the following default
|
|
614
|
+
# scopes: `openid`, `aws`, `sts:identity_context`.
|
|
615
|
+
#
|
|
616
|
+
# @option params [String] :redirect_uri
|
|
617
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
618
|
+
# This value specifies the location of the client or application that
|
|
619
|
+
# has registered to receive the authorization code.
|
|
620
|
+
#
|
|
621
|
+
# @option params [String] :subject_token
|
|
622
|
+
# Used only when calling this API for the Token Exchange grant type.
|
|
623
|
+
# This value specifies the subject of the exchange. The value of the
|
|
624
|
+
# subject token must be an access token issued by IAM Identity Center to
|
|
625
|
+
# a different client or application. The access token must have
|
|
626
|
+
# authorized scopes that indicate the requested application as a target
|
|
627
|
+
# audience.
|
|
628
|
+
#
|
|
629
|
+
# @option params [String] :subject_token_type
|
|
630
|
+
# Used only when calling this API for the Token Exchange grant type.
|
|
631
|
+
# This value specifies the type of token that is passed as the subject
|
|
632
|
+
# of the exchange. The following value is supported:
|
|
633
|
+
#
|
|
634
|
+
# * Access Token - `urn:ietf:params:oauth:token-type:access_token`
|
|
635
|
+
#
|
|
636
|
+
# @option params [String] :requested_token_type
|
|
637
|
+
# Used only when calling this API for the Token Exchange grant type.
|
|
638
|
+
# This value specifies the type of token that the requester can receive.
|
|
639
|
+
# The following values are supported:
|
|
640
|
+
#
|
|
641
|
+
# * Access Token - `urn:ietf:params:oauth:token-type:access_token`
|
|
642
|
+
#
|
|
643
|
+
# * Refresh Token - `urn:ietf:params:oauth:token-type:refresh_token`
|
|
644
|
+
#
|
|
645
|
+
# @option params [String] :code_verifier
|
|
646
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
647
|
+
# This value is generated by the client and presented to validate the
|
|
648
|
+
# original code challenge value the client passed at authorization time.
|
|
649
|
+
#
|
|
650
|
+
# @return [Types::CreateTokenWithIAMResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
651
|
+
#
|
|
652
|
+
# * {Types::CreateTokenWithIAMResponse#access_token #access_token} => String
|
|
653
|
+
# * {Types::CreateTokenWithIAMResponse#token_type #token_type} => String
|
|
654
|
+
# * {Types::CreateTokenWithIAMResponse#expires_in #expires_in} => Integer
|
|
655
|
+
# * {Types::CreateTokenWithIAMResponse#refresh_token #refresh_token} => String
|
|
656
|
+
# * {Types::CreateTokenWithIAMResponse#id_token #id_token} => String
|
|
657
|
+
# * {Types::CreateTokenWithIAMResponse#issued_token_type #issued_token_type} => String
|
|
658
|
+
# * {Types::CreateTokenWithIAMResponse#scope #scope} => Array<String>
|
|
659
|
+
#
|
|
660
|
+
#
|
|
661
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
|
|
662
|
+
#
|
|
663
|
+
# resp = client.create_token_with_iam({
|
|
664
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
665
|
+
# code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzg0In0EXAMPLEAUTHCODE",
|
|
666
|
+
# grant_type: "authorization_code",
|
|
667
|
+
# redirect_uri: "https://mywebapp.example/redirect",
|
|
668
|
+
# scope: [
|
|
669
|
+
# "openid",
|
|
670
|
+
# "aws",
|
|
671
|
+
# "sts:identity_context",
|
|
672
|
+
# ],
|
|
673
|
+
# })
|
|
674
|
+
#
|
|
675
|
+
# resp.to_h outputs the following:
|
|
676
|
+
# {
|
|
677
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
678
|
+
# expires_in: 1579729529,
|
|
679
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
|
|
680
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
|
681
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
682
|
+
# scope: [
|
|
683
|
+
# "openid",
|
|
684
|
+
# "aws",
|
|
685
|
+
# "sts:identity_context",
|
|
686
|
+
# ],
|
|
687
|
+
# token_type: "Bearer",
|
|
688
|
+
# }
|
|
689
|
+
#
|
|
690
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with IAM authentication
|
|
691
|
+
#
|
|
692
|
+
# resp = client.create_token_with_iam({
|
|
693
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
694
|
+
# grant_type: "refresh_token",
|
|
695
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
696
|
+
# })
|
|
697
|
+
#
|
|
698
|
+
# resp.to_h outputs the following:
|
|
699
|
+
# {
|
|
700
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
701
|
+
# expires_in: 1579729529,
|
|
702
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
|
703
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
704
|
+
# scope: [
|
|
705
|
+
# "openid",
|
|
706
|
+
# "aws",
|
|
707
|
+
# "sts:identity_context",
|
|
708
|
+
# ],
|
|
709
|
+
# token_type: "Bearer",
|
|
710
|
+
# }
|
|
711
|
+
#
|
|
712
|
+
# @example Example: Call OAuth/OIDC /token endpoint for JWT Bearer grant with IAM authentication
|
|
713
|
+
#
|
|
714
|
+
# resp = client.create_token_with_iam({
|
|
715
|
+
# assertion: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjFMVE16YWtpaGlSbGFfOHoyQkVKVlhlV01xbyJ9.eyJ2ZXIiOiIyLjAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vOTEyMjA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkL3YyLjAiLCJzdWIiOiJBQUFBQUFBQUFBQUFBQUFBQUFBQUFJa3pxRlZyU2FTYUZIeTc4MmJidGFRIiwiYXVkIjoiNmNiMDQwMTgtYTNmNS00NmE3LWI5OTUtOTQwYzc4ZjVhZWYzIiwiZXhwIjoxNTM2MzYxNDExLCJpYXQiOjE1MzYyNzQ3MTEsIm5iZiI6MTUzNjI3NDcxMSwibmFtZSI6IkFiZSBMaW5jb2xuIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQWJlTGlAbWljcm9zb2Z0LmNvbSIsIm9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC02NmYzLTMzMzJlY2E3ZWE4MSIsInRpZCI6IjkxMjIwNDBkLTZjNjctNGM1Yi1iMTEyLTM2YTMwNGI2NmRhZCIsIm5vbmNlIjoiMTIzNTIzIiwiYWlvIjoiRGYyVVZYTDFpeCFsTUNXTVNPSkJjRmF0emNHZnZGR2hqS3Y4cTVnMHg3MzJkUjVNQjVCaXN2R1FPN1lXQnlqZDhpUURMcSFlR2JJRGFreXA1bW5PcmNkcUhlWVNubHRlcFFtUnA2QUlaOGpZIn0.1AFWW-Ck5nROwSlltm7GzZvDwUkqvhSQpm55TQsmVo9Y59cLhRXpvB8n-55HCr9Z6G_31_UbeUkoz612I2j_Sm9FFShSDDjoaLQr54CreGIJvjtmS3EkK9a7SJBbcpL1MpUtlfygow39tFjY7EVNW9plWUvRrTgVk7lYLprvfzw-CIqw3gHC-T7IK_m_xkr08INERBtaecwhTeN4chPC4W3jdmw_lIxzC48YoQ0dB1L9-ImX98Egypfrlbm0IBL5spFzL6JDZIRRJOu8vecJvj1mq-IUhGt0MacxX8jdxYLP-KUu2d9MbNKpCKJuZ7p8gwTL5B7NlUdh_dmSviPWrw",
|
|
716
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
717
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
|
718
|
+
# })
|
|
719
|
+
#
|
|
720
|
+
# resp.to_h outputs the following:
|
|
721
|
+
# {
|
|
722
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
723
|
+
# expires_in: 1579729529,
|
|
724
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
|
|
725
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
|
726
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
727
|
+
# scope: [
|
|
728
|
+
# "openid",
|
|
729
|
+
# "aws",
|
|
730
|
+
# "sts:identity_context",
|
|
731
|
+
# ],
|
|
732
|
+
# token_type: "Bearer",
|
|
733
|
+
# }
|
|
734
|
+
#
|
|
735
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Token Exchange grant with IAM authentication
|
|
736
|
+
#
|
|
737
|
+
# resp = client.create_token_with_iam({
|
|
738
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
739
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
|
|
740
|
+
# requested_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
741
|
+
# subject_token: "aoak-Hig8TUDPNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZDIFFERENTACCESSTOKEN",
|
|
742
|
+
# subject_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
743
|
+
# })
|
|
744
|
+
#
|
|
745
|
+
# resp.to_h outputs the following:
|
|
746
|
+
# {
|
|
747
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
748
|
+
# expires_in: 1579729529,
|
|
749
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
|
|
750
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
751
|
+
# scope: [
|
|
752
|
+
# "openid",
|
|
753
|
+
# "aws",
|
|
754
|
+
# "sts:identity_context",
|
|
755
|
+
# ],
|
|
756
|
+
# token_type: "Bearer",
|
|
757
|
+
# }
|
|
758
|
+
#
|
|
759
|
+
# @example Request syntax with placeholder values
|
|
760
|
+
#
|
|
761
|
+
# resp = client.create_token_with_iam({
|
|
762
|
+
# client_id: "ClientId", # required
|
|
763
|
+
# grant_type: "GrantType", # required
|
|
764
|
+
# code: "AuthCode",
|
|
765
|
+
# refresh_token: "RefreshToken",
|
|
766
|
+
# assertion: "Assertion",
|
|
767
|
+
# scope: ["Scope"],
|
|
768
|
+
# redirect_uri: "URI",
|
|
769
|
+
# subject_token: "SubjectToken",
|
|
770
|
+
# subject_token_type: "TokenTypeURI",
|
|
771
|
+
# requested_token_type: "TokenTypeURI",
|
|
772
|
+
# code_verifier: "CodeVerifier",
|
|
773
|
+
# })
|
|
774
|
+
#
|
|
775
|
+
# @example Response structure
|
|
776
|
+
#
|
|
777
|
+
# resp.access_token #=> String
|
|
778
|
+
# resp.token_type #=> String
|
|
779
|
+
# resp.expires_in #=> Integer
|
|
780
|
+
# resp.refresh_token #=> String
|
|
781
|
+
# resp.id_token #=> String
|
|
782
|
+
# resp.issued_token_type #=> String
|
|
783
|
+
# resp.scope #=> Array
|
|
784
|
+
# resp.scope[0] #=> String
|
|
785
|
+
#
|
|
786
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM AWS API Documentation
|
|
787
|
+
#
|
|
788
|
+
# @overload create_token_with_iam(params = {})
|
|
789
|
+
# @param [Hash] params ({})
|
|
790
|
+
def create_token_with_iam(params = {}, options = {})
|
|
791
|
+
req = build_request(:create_token_with_iam, params)
|
|
792
|
+
req.send_request(options)
|
|
793
|
+
end
|
|
794
|
+
|
|
465
795
|
# Registers a client with IAM Identity Center. This allows clients to
|
|
466
796
|
# initiate device authorization. The output should be persisted for
|
|
467
797
|
# reuse through many authentication requests.
|
|
@@ -478,6 +808,28 @@ module Aws::SSOOIDC
|
|
|
478
808
|
# this list is used to restrict permissions when granting an access
|
|
479
809
|
# token.
|
|
480
810
|
#
|
|
811
|
+
# @option params [Array<String>] :redirect_uris
|
|
812
|
+
# The list of redirect URI that are defined by the client. At completion
|
|
813
|
+
# of authorization, this list is used to restrict what locations the
|
|
814
|
+
# user agent can be redirected back to.
|
|
815
|
+
#
|
|
816
|
+
# @option params [Array<String>] :grant_types
|
|
817
|
+
# The list of OAuth 2.0 grant types that are defined by the client. This
|
|
818
|
+
# list is used to restrict the token granting flows available to the
|
|
819
|
+
# client.
|
|
820
|
+
#
|
|
821
|
+
# @option params [String] :issuer_url
|
|
822
|
+
# The IAM Identity Center Issuer URL associated with an instance of IAM
|
|
823
|
+
# Identity Center. This value is needed for user access to resources
|
|
824
|
+
# through the client.
|
|
825
|
+
#
|
|
826
|
+
# @option params [String] :entitled_application_arn
|
|
827
|
+
# This IAM Identity Center application ARN is used to define
|
|
828
|
+
# administrator-managed configuration for public client access to
|
|
829
|
+
# resources. At authorization, the scopes, grants, and redirect URI
|
|
830
|
+
# available to this client will be restricted by this application
|
|
831
|
+
# resource.
|
|
832
|
+
#
|
|
481
833
|
# @return [Types::RegisterClientResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
482
834
|
#
|
|
483
835
|
# * {Types::RegisterClientResponse#client_id #client_id} => String
|
|
@@ -487,12 +839,45 @@ module Aws::SSOOIDC
|
|
|
487
839
|
# * {Types::RegisterClientResponse#authorization_endpoint #authorization_endpoint} => String
|
|
488
840
|
# * {Types::RegisterClientResponse#token_endpoint #token_endpoint} => String
|
|
489
841
|
#
|
|
842
|
+
#
|
|
843
|
+
# @example Example: Call OAuth/OIDC /register-client endpoint
|
|
844
|
+
#
|
|
845
|
+
# resp = client.register_client({
|
|
846
|
+
# client_name: "My IDE Plugin",
|
|
847
|
+
# client_type: "public",
|
|
848
|
+
# entitled_application_arn: "arn:aws:sso::ACCOUNTID:application/ssoins-1111111111111111/apl-1111111111111111",
|
|
849
|
+
# grant_types: [
|
|
850
|
+
# "authorization_code",
|
|
851
|
+
# "refresh_token",
|
|
852
|
+
# ],
|
|
853
|
+
# issuer_url: "https://identitycenter.amazonaws.com/ssoins-1111111111111111",
|
|
854
|
+
# redirect_uris: [
|
|
855
|
+
# "127.0.0.1:PORT/oauth/callback",
|
|
856
|
+
# ],
|
|
857
|
+
# scopes: [
|
|
858
|
+
# "sso:account:access",
|
|
859
|
+
# "codewhisperer:completions",
|
|
860
|
+
# ],
|
|
861
|
+
# })
|
|
862
|
+
#
|
|
863
|
+
# resp.to_h outputs the following:
|
|
864
|
+
# {
|
|
865
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
866
|
+
# client_id_issued_at: 1579725929,
|
|
867
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
868
|
+
# client_secret_expires_at: 1587584729,
|
|
869
|
+
# }
|
|
870
|
+
#
|
|
490
871
|
# @example Request syntax with placeholder values
|
|
491
872
|
#
|
|
492
873
|
# resp = client.register_client({
|
|
493
874
|
# client_name: "ClientName", # required
|
|
494
875
|
# client_type: "ClientType", # required
|
|
495
876
|
# scopes: ["Scope"],
|
|
877
|
+
# redirect_uris: ["URI"],
|
|
878
|
+
# grant_types: ["GrantType"],
|
|
879
|
+
# issuer_url: "URI",
|
|
880
|
+
# entitled_application_arn: "ArnType",
|
|
496
881
|
# })
|
|
497
882
|
#
|
|
498
883
|
# @example Response structure
|
|
@@ -526,8 +911,9 @@ module Aws::SSOOIDC
|
|
|
526
911
|
# come from the persisted result of the RegisterClient API operation.
|
|
527
912
|
#
|
|
528
913
|
# @option params [required, String] :start_url
|
|
529
|
-
# The URL for the
|
|
530
|
-
# the
|
|
914
|
+
# The URL for the Amazon Web Services access portal. For more
|
|
915
|
+
# information, see [Using the Amazon Web Services access portal][1] in
|
|
916
|
+
# the *IAM Identity Center User Guide*.
|
|
531
917
|
#
|
|
532
918
|
#
|
|
533
919
|
#
|
|
@@ -542,6 +928,25 @@ module Aws::SSOOIDC
|
|
|
542
928
|
# * {Types::StartDeviceAuthorizationResponse#expires_in #expires_in} => Integer
|
|
543
929
|
# * {Types::StartDeviceAuthorizationResponse#interval #interval} => Integer
|
|
544
930
|
#
|
|
931
|
+
#
|
|
932
|
+
# @example Example: Call OAuth/OIDC /start-device-authorization endpoint
|
|
933
|
+
#
|
|
934
|
+
# resp = client.start_device_authorization({
|
|
935
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
936
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
937
|
+
# start_url: "https://identitycenter.amazonaws.com/ssoins-111111111111",
|
|
938
|
+
# })
|
|
939
|
+
#
|
|
940
|
+
# resp.to_h outputs the following:
|
|
941
|
+
# {
|
|
942
|
+
# device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
|
|
943
|
+
# expires_in: 1579729529,
|
|
944
|
+
# interval: 1,
|
|
945
|
+
# user_code: "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
|
|
946
|
+
# verification_uri: "https://device.sso.us-west-2.amazonaws.com",
|
|
947
|
+
# verification_uri_complete: "https://device.sso.us-west-2.amazonaws.com?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
|
|
948
|
+
# }
|
|
949
|
+
#
|
|
545
950
|
# @example Request syntax with placeholder values
|
|
546
951
|
#
|
|
547
952
|
# resp = client.start_device_authorization({
|
|
@@ -581,7 +986,7 @@ module Aws::SSOOIDC
|
|
|
581
986
|
params: params,
|
|
582
987
|
config: config)
|
|
583
988
|
context[:gem_name] = 'aws-sdk-core'
|
|
584
|
-
context[:gem_version] = '3.
|
|
989
|
+
context[:gem_version] = '3.199.0'
|
|
585
990
|
Seahorse::Client::Request.new(handlers, context)
|
|
586
991
|
end
|
|
587
992
|
|