aws-sdk-core 3.168.4 → 3.224.1
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 +719 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +5 -6
- data/lib/aws-defaults.rb +4 -1
- data/lib/aws-sdk-core/arn.rb +1 -3
- data/lib/aws-sdk-core/assume_role_credentials.rb +13 -5
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -7
- 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/decoder.rb +308 -0
- data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
- data/lib/aws-sdk-core/cbor.rb +53 -0
- data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
- data/lib/aws-sdk-core/client_stubs.rb +33 -55
- data/lib/aws-sdk-core/credential_provider.rb +8 -1
- data/lib/aws-sdk-core/credential_provider_chain.rb +39 -11
- data/lib/aws-sdk-core/credentials.rb +19 -6
- data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
- data/lib/aws-sdk-core/ecs_credentials.rb +179 -53
- data/lib/aws-sdk-core/endpoints/condition.rb +5 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
- 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 +19 -18
- 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 +79 -19
- data/lib/aws-sdk-core/error_handler.rb +41 -0
- data/lib/aws-sdk-core/errors.rb +14 -5
- 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 +56 -32
- data/lib/aws-sdk-core/json/builder.rb +8 -1
- data/lib/aws-sdk-core/json/error_handler.rb +30 -14
- data/lib/aws-sdk-core/json/handler.rb +13 -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/log/param_filter.rb +2 -2
- data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
- data/lib/aws-sdk-core/log.rb +10 -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/bearer_authorization.rb +2 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +333 -168
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -1
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +9 -3
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/http_checksum.rb +3 -8
- 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 +162 -37
- 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 +44 -17
- data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
- data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
- data/lib/aws-sdk-core/plugins/stub_responses.rb +53 -9
- data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
- data/lib/aws-sdk-core/plugins/user_agent.rb +191 -14
- data/lib/aws-sdk-core/plugins.rb +39 -0
- data/lib/aws-sdk-core/process_credentials.rb +48 -29
- 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/resources.rb +8 -0
- 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/cbor_engine.rb +18 -0
- data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +85 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
- data/lib/aws-sdk-core/rpc_v2.rb +69 -0
- data/lib/aws-sdk-core/shared_config.rb +125 -39
- data/lib/aws-sdk-core/shared_credentials.rb +1 -7
- data/lib/aws-sdk-core/sso_credentials.rb +5 -2
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
- data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
- data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
- data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
- data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
- data/lib/aws-sdk-core/stubbing.rb +22 -0
- data/lib/aws-sdk-core/telemetry/base.rb +177 -0
- data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
- data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
- data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
- data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
- data/lib/aws-sdk-core/telemetry.rb +78 -0
- data/lib/aws-sdk-core/util.rb +39 -0
- data/lib/aws-sdk-core/waiters/poller.rb +12 -5
- 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/{engines/oga.rb → oga_engine.rb} +2 -0
- 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 +82 -107
- data/lib/aws-sdk-sso/client.rb +185 -79
- data/lib/aws-sdk-sso/client_api.rb +7 -0
- data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-sso/endpoint_provider.rb +37 -96
- data/lib/aws-sdk-sso/endpoints.rb +3 -54
- data/lib/aws-sdk-sso/plugins/endpoints.rb +23 -22
- data/lib/aws-sdk-sso/types.rb +1 -0
- data/lib/aws-sdk-sso.rb +15 -11
- data/lib/aws-sdk-ssooidc/client.rb +592 -112
- data/lib/aws-sdk-ssooidc/client_api.rb +89 -1
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +37 -95
- data/lib/aws-sdk-ssooidc/endpoints.rb +3 -40
- data/lib/aws-sdk-ssooidc/errors.rb +52 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +23 -20
- data/lib/aws-sdk-ssooidc/types.rb +407 -53
- data/lib/aws-sdk-ssooidc.rb +15 -11
- data/lib/aws-sdk-sts/client.rb +516 -238
- data/lib/aws-sdk-sts/client_api.rb +48 -11
- data/lib/aws-sdk-sts/customizations.rb +5 -1
- data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
- data/lib/aws-sdk-sts/endpoint_provider.rb +91 -213
- data/lib/aws-sdk-sts/endpoints.rb +3 -118
- data/lib/aws-sdk-sts/errors.rb +16 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +23 -30
- data/lib/aws-sdk-sts/presigner.rb +1 -1
- data/lib/aws-sdk-sts/types.rb +217 -36
- data/lib/aws-sdk-sts.rb +15 -11
- data/lib/seahorse/client/async_base.rb +4 -5
- data/lib/seahorse/client/async_response.rb +19 -0
- data/lib/seahorse/client/base.rb +18 -21
- data/lib/seahorse/client/configuration.rb +0 -4
- data/lib/seahorse/client/h2/connection.rb +25 -31
- data/lib/seahorse/client/h2/handler.rb +14 -3
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/http/response.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +13 -11
- data/lib/seahorse/client/net_http/handler.rb +21 -9
- data/lib/seahorse/client/net_http/patches.rb +1 -4
- data/lib/seahorse/client/networking_error.rb +1 -1
- data/lib/seahorse/client/plugin.rb +9 -0
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/h2.rb +4 -4
- data/lib/seahorse/client/plugins/net_http.rb +57 -16
- data/lib/seahorse/client/plugins/request_callback.rb +31 -0
- data/lib/seahorse/client/request_context.rb +8 -1
- data/lib/seahorse/client/response.rb +8 -0
- data/lib/seahorse/model/operation.rb +3 -0
- data/lib/seahorse/model/shapes.rb +2 -2
- data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
- 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/telemetry/base.rbs +46 -0
- data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
- data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
- data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
- data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
- data/sig/aws-sdk-core.rbs +7 -0
- data/sig/seahorse/client/async_base.rbs +18 -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 +92 -23
- /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/ox.rb → ox_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
|
@@ -7,33 +7,34 @@
|
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
10
|
-
require 'seahorse/client/plugins/content_length
|
|
11
|
-
require 'aws-sdk-core/plugins/credentials_configuration
|
|
12
|
-
require 'aws-sdk-core/plugins/logging
|
|
13
|
-
require 'aws-sdk-core/plugins/param_converter
|
|
14
|
-
require 'aws-sdk-core/plugins/param_validator
|
|
15
|
-
require 'aws-sdk-core/plugins/user_agent
|
|
16
|
-
require 'aws-sdk-core/plugins/helpful_socket_errors
|
|
17
|
-
require 'aws-sdk-core/plugins/retry_errors
|
|
18
|
-
require 'aws-sdk-core/plugins/global_configuration
|
|
19
|
-
require 'aws-sdk-core/plugins/regional_endpoint
|
|
20
|
-
require 'aws-sdk-core/plugins/endpoint_discovery
|
|
21
|
-
require 'aws-sdk-core/plugins/endpoint_pattern
|
|
22
|
-
require 'aws-sdk-core/plugins/response_paging
|
|
23
|
-
require 'aws-sdk-core/plugins/stub_responses
|
|
24
|
-
require 'aws-sdk-core/plugins/idempotency_token
|
|
25
|
-
require 'aws-sdk-core/plugins/
|
|
26
|
-
require 'aws-sdk-core/plugins/
|
|
27
|
-
require 'aws-sdk-core/plugins/
|
|
28
|
-
require 'aws-sdk-core/plugins/
|
|
29
|
-
require 'aws-sdk-core/plugins/
|
|
30
|
-
require 'aws-sdk-core/plugins/
|
|
31
|
-
require 'aws-sdk-core/plugins/
|
|
32
|
-
require 'aws-sdk-core/plugins/
|
|
33
|
-
require 'aws-sdk-core/plugins/
|
|
34
|
-
require 'aws-sdk-core/plugins/
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
require 'seahorse/client/plugins/content_length'
|
|
11
|
+
require 'aws-sdk-core/plugins/credentials_configuration'
|
|
12
|
+
require 'aws-sdk-core/plugins/logging'
|
|
13
|
+
require 'aws-sdk-core/plugins/param_converter'
|
|
14
|
+
require 'aws-sdk-core/plugins/param_validator'
|
|
15
|
+
require 'aws-sdk-core/plugins/user_agent'
|
|
16
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors'
|
|
17
|
+
require 'aws-sdk-core/plugins/retry_errors'
|
|
18
|
+
require 'aws-sdk-core/plugins/global_configuration'
|
|
19
|
+
require 'aws-sdk-core/plugins/regional_endpoint'
|
|
20
|
+
require 'aws-sdk-core/plugins/endpoint_discovery'
|
|
21
|
+
require 'aws-sdk-core/plugins/endpoint_pattern'
|
|
22
|
+
require 'aws-sdk-core/plugins/response_paging'
|
|
23
|
+
require 'aws-sdk-core/plugins/stub_responses'
|
|
24
|
+
require 'aws-sdk-core/plugins/idempotency_token'
|
|
25
|
+
require 'aws-sdk-core/plugins/invocation_id'
|
|
26
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter'
|
|
27
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin'
|
|
28
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin'
|
|
29
|
+
require 'aws-sdk-core/plugins/transfer_encoding'
|
|
30
|
+
require 'aws-sdk-core/plugins/http_checksum'
|
|
31
|
+
require 'aws-sdk-core/plugins/checksum_algorithm'
|
|
32
|
+
require 'aws-sdk-core/plugins/request_compression'
|
|
33
|
+
require 'aws-sdk-core/plugins/defaults_mode'
|
|
34
|
+
require 'aws-sdk-core/plugins/recursion_detection'
|
|
35
|
+
require 'aws-sdk-core/plugins/telemetry'
|
|
36
|
+
require 'aws-sdk-core/plugins/sign'
|
|
37
|
+
require 'aws-sdk-core/plugins/protocols/rest_json'
|
|
37
38
|
|
|
38
39
|
module Aws::SSOOIDC
|
|
39
40
|
# An API client for SSOOIDC. To construct a client, you need to configure a `:region` and `:credentials`.
|
|
@@ -71,20 +72,28 @@ module Aws::SSOOIDC
|
|
|
71
72
|
add_plugin(Aws::Plugins::ResponsePaging)
|
|
72
73
|
add_plugin(Aws::Plugins::StubResponses)
|
|
73
74
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
|
75
|
+
add_plugin(Aws::Plugins::InvocationId)
|
|
74
76
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
|
75
77
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
|
76
78
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
|
77
79
|
add_plugin(Aws::Plugins::TransferEncoding)
|
|
78
80
|
add_plugin(Aws::Plugins::HttpChecksum)
|
|
79
81
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
|
82
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
|
80
83
|
add_plugin(Aws::Plugins::DefaultsMode)
|
|
81
84
|
add_plugin(Aws::Plugins::RecursionDetection)
|
|
85
|
+
add_plugin(Aws::Plugins::Telemetry)
|
|
82
86
|
add_plugin(Aws::Plugins::Sign)
|
|
83
87
|
add_plugin(Aws::Plugins::Protocols::RestJson)
|
|
84
88
|
add_plugin(Aws::SSOOIDC::Plugins::Endpoints)
|
|
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:
|
|
@@ -119,13 +128,15 @@ module Aws::SSOOIDC
|
|
|
119
128
|
# locations will be searched for credentials:
|
|
120
129
|
#
|
|
121
130
|
# * `Aws.config[:credentials]`
|
|
122
|
-
# * The `:access_key_id`, `:secret_access_key`,
|
|
123
|
-
#
|
|
131
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
|
132
|
+
# `:account_id` options.
|
|
133
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
|
|
134
|
+
# ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
|
|
124
135
|
# * `~/.aws/credentials`
|
|
125
136
|
# * `~/.aws/config`
|
|
126
137
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
|
127
138
|
# are very aggressive. Construct and pass an instance of
|
|
128
|
-
# `Aws::
|
|
139
|
+
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
|
129
140
|
# enable retries and extended timeouts. Instance profile credential
|
|
130
141
|
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
|
131
142
|
# to true.
|
|
@@ -144,6 +155,8 @@ module Aws::SSOOIDC
|
|
|
144
155
|
#
|
|
145
156
|
# @option options [String] :access_key_id
|
|
146
157
|
#
|
|
158
|
+
# @option options [String] :account_id
|
|
159
|
+
#
|
|
147
160
|
# @option options [Boolean] :active_endpoint_cache (false)
|
|
148
161
|
# When set to `true`, a thread polling for endpoints will be running in
|
|
149
162
|
# the background every 60 secs (default). Defaults to `false`.
|
|
@@ -187,13 +200,22 @@ module Aws::SSOOIDC
|
|
|
187
200
|
# accepted modes and the configuration defaults that are included.
|
|
188
201
|
#
|
|
189
202
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
|
190
|
-
#
|
|
191
|
-
# to default service endpoint when available.
|
|
203
|
+
# When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
|
|
192
204
|
#
|
|
193
|
-
# @option options [
|
|
194
|
-
#
|
|
195
|
-
#
|
|
196
|
-
#
|
|
205
|
+
# @option options [Boolean] :disable_request_compression (false)
|
|
206
|
+
# When set to 'true' the request body will not be compressed
|
|
207
|
+
# for supported operations.
|
|
208
|
+
#
|
|
209
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
|
210
|
+
# Normally you should not configure the `:endpoint` option
|
|
211
|
+
# directly. This is normally constructed from the `:region`
|
|
212
|
+
# option. Configuring `:endpoint` is normally reserved for
|
|
213
|
+
# connecting to test or custom endpoints. The endpoint should
|
|
214
|
+
# be a URI formatted like:
|
|
215
|
+
#
|
|
216
|
+
# 'http://example.com'
|
|
217
|
+
# 'https://example.com'
|
|
218
|
+
# 'http://example.com:123'
|
|
197
219
|
#
|
|
198
220
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
|
199
221
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
|
@@ -210,6 +232,10 @@ module Aws::SSOOIDC
|
|
|
210
232
|
# @option options [Boolean] :endpoint_discovery (false)
|
|
211
233
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
|
212
234
|
#
|
|
235
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
|
236
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
|
237
|
+
# variables and the shared configuration file.
|
|
238
|
+
#
|
|
213
239
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
|
214
240
|
# The log formatter.
|
|
215
241
|
#
|
|
@@ -230,6 +256,34 @@ module Aws::SSOOIDC
|
|
|
230
256
|
# Used when loading credentials from the shared credentials file
|
|
231
257
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
|
232
258
|
#
|
|
259
|
+
# @option options [String] :request_checksum_calculation ("when_supported")
|
|
260
|
+
# Determines when a checksum will be calculated for request payloads. Values are:
|
|
261
|
+
#
|
|
262
|
+
# * `when_supported` - (default) When set, a checksum will be
|
|
263
|
+
# calculated for all request payloads of operations modeled with the
|
|
264
|
+
# `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
|
|
265
|
+
# `requestAlgorithmMember` is modeled.
|
|
266
|
+
# * `when_required` - When set, a checksum will only be calculated for
|
|
267
|
+
# request payloads of operations modeled with the `httpChecksum` trait where
|
|
268
|
+
# `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
|
|
269
|
+
# is modeled and supplied.
|
|
270
|
+
#
|
|
271
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
|
272
|
+
# The minimum size in bytes that triggers compression for request
|
|
273
|
+
# bodies. The value must be non-negative integer value between 0
|
|
274
|
+
# and 10485780 bytes inclusive.
|
|
275
|
+
#
|
|
276
|
+
# @option options [String] :response_checksum_validation ("when_supported")
|
|
277
|
+
# Determines when checksum validation will be performed on response payloads. Values are:
|
|
278
|
+
#
|
|
279
|
+
# * `when_supported` - (default) When set, checksum validation is performed on all
|
|
280
|
+
# response payloads of operations modeled with the `httpChecksum` trait where
|
|
281
|
+
# `responseAlgorithms` is modeled, except when no modeled checksum algorithms
|
|
282
|
+
# are supported.
|
|
283
|
+
# * `when_required` - When set, checksum validation is not performed on
|
|
284
|
+
# response payloads of operations unless the checksum algorithm is supported and
|
|
285
|
+
# the `requestValidationModeMember` member is set to `ENABLED`.
|
|
286
|
+
#
|
|
233
287
|
# @option options [Proc] :retry_backoff
|
|
234
288
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
|
235
289
|
# This option is only used in the `legacy` retry mode.
|
|
@@ -274,11 +328,25 @@ module Aws::SSOOIDC
|
|
|
274
328
|
# throttling. This is a provisional mode that may change behavior
|
|
275
329
|
# in the future.
|
|
276
330
|
#
|
|
331
|
+
# @option options [String] :sdk_ua_app_id
|
|
332
|
+
# A unique and opaque application ID that is appended to the
|
|
333
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
|
334
|
+
# maximum length of 50. This variable is sourced from environment
|
|
335
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
|
277
336
|
#
|
|
278
337
|
# @option options [String] :secret_access_key
|
|
279
338
|
#
|
|
280
339
|
# @option options [String] :session_token
|
|
281
340
|
#
|
|
341
|
+
# @option options [Array] :sigv4a_signing_region_set
|
|
342
|
+
# A list of regions that should be signed with SigV4a signing. When
|
|
343
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
|
344
|
+
# in the following locations:
|
|
345
|
+
#
|
|
346
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
|
347
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
|
348
|
+
# * `~/.aws/config`
|
|
349
|
+
#
|
|
282
350
|
# @option options [Boolean] :stub_responses (false)
|
|
283
351
|
# Causes the client to return stubbed responses. By default
|
|
284
352
|
# fake responses are generated and returned. You can specify
|
|
@@ -288,6 +356,16 @@ module Aws::SSOOIDC
|
|
|
288
356
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
|
289
357
|
# requests are made, and retries are disabled.
|
|
290
358
|
#
|
|
359
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
|
360
|
+
# Allows you to provide a telemetry provider, which is used to
|
|
361
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
|
362
|
+
# will not record or emit any telemetry data. The SDK supports the
|
|
363
|
+
# following telemetry providers:
|
|
364
|
+
#
|
|
365
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
|
366
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
|
367
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
|
368
|
+
#
|
|
291
369
|
# @option options [Aws::TokenProvider] :token_provider
|
|
292
370
|
# A Bearer Token Provider. This can be an instance of any one of the
|
|
293
371
|
# following classes:
|
|
@@ -315,52 +393,75 @@ module Aws::SSOOIDC
|
|
|
315
393
|
# sending the request.
|
|
316
394
|
#
|
|
317
395
|
# @option options [Aws::SSOOIDC::EndpointProvider] :endpoint_provider
|
|
318
|
-
# The endpoint provider used to resolve endpoints. Any object that responds to
|
|
319
|
-
#
|
|
320
|
-
#
|
|
321
|
-
#
|
|
322
|
-
#
|
|
323
|
-
#
|
|
324
|
-
#
|
|
325
|
-
# `
|
|
326
|
-
#
|
|
327
|
-
#
|
|
328
|
-
#
|
|
329
|
-
#
|
|
330
|
-
#
|
|
331
|
-
#
|
|
332
|
-
#
|
|
333
|
-
#
|
|
334
|
-
#
|
|
396
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
|
397
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
|
398
|
+
# `Aws::SSOOIDC::EndpointParameters`.
|
|
399
|
+
#
|
|
400
|
+
# @option options [Float] :http_continue_timeout (1)
|
|
401
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
|
402
|
+
# request body. This option has no effect unless the request has "Expect"
|
|
403
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
|
404
|
+
# behaviour. This value can safely be set per request on the session.
|
|
405
|
+
#
|
|
406
|
+
# @option options [Float] :http_idle_timeout (5)
|
|
407
|
+
# The number of seconds a connection is allowed to sit idle before it
|
|
408
|
+
# is considered stale. Stale connections are closed and removed from the
|
|
409
|
+
# pool before making a request.
|
|
410
|
+
#
|
|
411
|
+
# @option options [Float] :http_open_timeout (15)
|
|
412
|
+
# The default number of seconds to wait for response data.
|
|
413
|
+
# This value can safely be set per-request on the session.
|
|
414
|
+
#
|
|
415
|
+
# @option options [URI::HTTP,String] :http_proxy
|
|
416
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
|
417
|
+
#
|
|
418
|
+
# @option options [Float] :http_read_timeout (60)
|
|
419
|
+
# The default number of seconds to wait for response data.
|
|
420
|
+
# This value can safely be set per-request on the session.
|
|
421
|
+
#
|
|
422
|
+
# @option options [Boolean] :http_wire_trace (false)
|
|
423
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
|
424
|
+
#
|
|
425
|
+
# @option options [Proc] :on_chunk_received
|
|
426
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
427
|
+
# of the response body is received. It provides three arguments: the chunk,
|
|
428
|
+
# the number of bytes received, and the total number of
|
|
429
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
|
430
|
+
#
|
|
431
|
+
# @option options [Proc] :on_chunk_sent
|
|
432
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
433
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
|
434
|
+
# the number of bytes read from the body, and the total number of
|
|
435
|
+
# bytes in the body.
|
|
436
|
+
#
|
|
437
|
+
# @option options [Boolean] :raise_response_errors (true)
|
|
438
|
+
# When `true`, response errors are raised.
|
|
439
|
+
#
|
|
440
|
+
# @option options [String] :ssl_ca_bundle
|
|
441
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
|
442
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
|
443
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
|
444
|
+
#
|
|
445
|
+
# @option options [String] :ssl_ca_directory
|
|
446
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
|
447
|
+
# authority files for verifying peer certificates. If you do
|
|
448
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
|
449
|
+
# default will be used if available.
|
|
335
450
|
#
|
|
336
|
-
# @option options [
|
|
337
|
-
#
|
|
338
|
-
# request body. This option has no effect unless the request has
|
|
339
|
-
# "Expect" header set to "100-continue". Defaults to `nil` which
|
|
340
|
-
# disables this behaviour. This value can safely be set per
|
|
341
|
-
# request on the session.
|
|
451
|
+
# @option options [String] :ssl_ca_store
|
|
452
|
+
# Sets the X509::Store to verify peer certificate.
|
|
342
453
|
#
|
|
343
|
-
# @option options [
|
|
344
|
-
#
|
|
454
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
|
455
|
+
# Sets a client certificate when creating http connections.
|
|
345
456
|
#
|
|
346
|
-
# @option options [
|
|
347
|
-
#
|
|
457
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
|
458
|
+
# Sets a client key when creating http connections.
|
|
348
459
|
#
|
|
349
|
-
# @option options [
|
|
350
|
-
#
|
|
351
|
-
# connection.
|
|
460
|
+
# @option options [Float] :ssl_timeout
|
|
461
|
+
# Sets the SSL timeout in seconds
|
|
352
462
|
#
|
|
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.
|
|
463
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
|
464
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
|
364
465
|
#
|
|
365
466
|
def initialize(*args)
|
|
366
467
|
super
|
|
@@ -368,61 +469,67 @@ module Aws::SSOOIDC
|
|
|
368
469
|
|
|
369
470
|
# @!group API Operations
|
|
370
471
|
|
|
371
|
-
# Creates and returns
|
|
372
|
-
# access token
|
|
373
|
-
#
|
|
472
|
+
# Creates and returns access and refresh tokens for clients that are
|
|
473
|
+
# authenticated using client secrets. The access token can be used to
|
|
474
|
+
# fetch short-lived credentials for the assigned AWS accounts or to
|
|
475
|
+
# access application APIs using `bearer` authentication.
|
|
374
476
|
#
|
|
375
477
|
# @option params [required, String] :client_id
|
|
376
|
-
# The unique identifier string for
|
|
377
|
-
# from the
|
|
478
|
+
# The unique identifier string for the client or application. This value
|
|
479
|
+
# comes from the result of the RegisterClient API.
|
|
378
480
|
#
|
|
379
481
|
# @option params [required, String] :client_secret
|
|
380
482
|
# A secret string generated for the client. This value should come from
|
|
381
483
|
# the persisted result of the RegisterClient API.
|
|
382
484
|
#
|
|
383
485
|
# @option params [required, String] :grant_type
|
|
384
|
-
# Supports
|
|
385
|
-
#
|
|
386
|
-
#
|
|
486
|
+
# Supports the following OAuth grant types: Authorization Code, Device
|
|
487
|
+
# Code, and Refresh Token. Specify one of the following values,
|
|
488
|
+
# depending on the grant type that you want:
|
|
489
|
+
#
|
|
490
|
+
# * Authorization Code - `authorization_code`
|
|
387
491
|
#
|
|
388
|
-
# `urn:ietf:params:oauth:grant-type:device_code
|
|
492
|
+
# * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
|
|
389
493
|
#
|
|
390
|
-
#
|
|
391
|
-
# StartDeviceAuthorization topic.
|
|
494
|
+
# * Refresh Token - `refresh_token`
|
|
392
495
|
#
|
|
393
496
|
# @option params [String] :device_code
|
|
394
|
-
# Used only when calling this API for the
|
|
395
|
-
# short-
|
|
396
|
-
#
|
|
397
|
-
# StartDeviceAuthorization API.
|
|
497
|
+
# Used only when calling this API for the Device Code grant type. This
|
|
498
|
+
# short-lived code is used to identify this authorization request. This
|
|
499
|
+
# comes from the result of the StartDeviceAuthorization API.
|
|
398
500
|
#
|
|
399
501
|
# @option params [String] :code
|
|
400
|
-
#
|
|
401
|
-
#
|
|
402
|
-
# access to a token.
|
|
502
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
503
|
+
# The short-lived code is used to identify this authorization request.
|
|
403
504
|
#
|
|
404
505
|
# @option params [String] :refresh_token
|
|
405
|
-
#
|
|
506
|
+
# Used only when calling this API for the Refresh Token grant type. This
|
|
507
|
+
# token is used to refresh short-lived tokens, such as the access token,
|
|
508
|
+
# that might expire.
|
|
509
|
+
#
|
|
406
510
|
# For more information about the features and limitations of the current
|
|
407
511
|
# IAM Identity Center OIDC implementation, see *Considerations for Using
|
|
408
512
|
# this Guide* in the [IAM Identity Center OIDC API Reference][1].
|
|
409
513
|
#
|
|
410
|
-
# The token used to obtain an access token in the event that the access
|
|
411
|
-
# token is invalid or expired.
|
|
412
|
-
#
|
|
413
514
|
#
|
|
414
515
|
#
|
|
415
516
|
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
|
|
416
517
|
#
|
|
417
518
|
# @option params [Array<String>] :scope
|
|
418
|
-
# The list of scopes
|
|
419
|
-
#
|
|
420
|
-
#
|
|
519
|
+
# The list of scopes for which authorization is requested. The access
|
|
520
|
+
# token that is issued is limited to the scopes that are granted. If
|
|
521
|
+
# this value is not specified, IAM Identity Center authorizes all scopes
|
|
522
|
+
# that are configured for the client during the call to RegisterClient.
|
|
421
523
|
#
|
|
422
524
|
# @option params [String] :redirect_uri
|
|
423
|
-
#
|
|
424
|
-
#
|
|
425
|
-
#
|
|
525
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
526
|
+
# This value specifies the location of the client or application that
|
|
527
|
+
# has registered to receive the authorization code.
|
|
528
|
+
#
|
|
529
|
+
# @option params [String] :code_verifier
|
|
530
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
531
|
+
# This value is generated by the client and presented to validate the
|
|
532
|
+
# original code challenge value the client passed at authorization time.
|
|
426
533
|
#
|
|
427
534
|
# @return [Types::CreateTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
428
535
|
#
|
|
@@ -432,6 +539,44 @@ module Aws::SSOOIDC
|
|
|
432
539
|
# * {Types::CreateTokenResponse#refresh_token #refresh_token} => String
|
|
433
540
|
# * {Types::CreateTokenResponse#id_token #id_token} => String
|
|
434
541
|
#
|
|
542
|
+
#
|
|
543
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Device Code grant with Secret authentication
|
|
544
|
+
#
|
|
545
|
+
# resp = client.create_token({
|
|
546
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
547
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
548
|
+
# device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
|
|
549
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:device-code",
|
|
550
|
+
# })
|
|
551
|
+
#
|
|
552
|
+
# resp.to_h outputs the following:
|
|
553
|
+
# {
|
|
554
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
555
|
+
# expires_in: 1579729529,
|
|
556
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
557
|
+
# token_type: "Bearer",
|
|
558
|
+
# }
|
|
559
|
+
#
|
|
560
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with Secret authentication
|
|
561
|
+
#
|
|
562
|
+
# resp = client.create_token({
|
|
563
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
564
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
565
|
+
# grant_type: "refresh_token",
|
|
566
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
567
|
+
# scope: [
|
|
568
|
+
# "codewhisperer:completions",
|
|
569
|
+
# ],
|
|
570
|
+
# })
|
|
571
|
+
#
|
|
572
|
+
# resp.to_h outputs the following:
|
|
573
|
+
# {
|
|
574
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
575
|
+
# expires_in: 1579729529,
|
|
576
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
577
|
+
# token_type: "Bearer",
|
|
578
|
+
# }
|
|
579
|
+
#
|
|
435
580
|
# @example Request syntax with placeholder values
|
|
436
581
|
#
|
|
437
582
|
# resp = client.create_token({
|
|
@@ -443,6 +588,7 @@ module Aws::SSOOIDC
|
|
|
443
588
|
# refresh_token: "RefreshToken",
|
|
444
589
|
# scope: ["Scope"],
|
|
445
590
|
# redirect_uri: "URI",
|
|
591
|
+
# code_verifier: "CodeVerifier",
|
|
446
592
|
# })
|
|
447
593
|
#
|
|
448
594
|
# @example Response structure
|
|
@@ -462,9 +608,256 @@ module Aws::SSOOIDC
|
|
|
462
608
|
req.send_request(options)
|
|
463
609
|
end
|
|
464
610
|
|
|
465
|
-
#
|
|
466
|
-
#
|
|
467
|
-
#
|
|
611
|
+
# Creates and returns access and refresh tokens for clients and
|
|
612
|
+
# applications that are authenticated using IAM entities. The access
|
|
613
|
+
# token can be used to fetch short-lived credentials for the assigned
|
|
614
|
+
# Amazon Web Services accounts or to access application APIs using
|
|
615
|
+
# `bearer` authentication.
|
|
616
|
+
#
|
|
617
|
+
# @option params [required, String] :client_id
|
|
618
|
+
# The unique identifier string for the client or application. This value
|
|
619
|
+
# is an application ARN that has OAuth grants configured.
|
|
620
|
+
#
|
|
621
|
+
# @option params [required, String] :grant_type
|
|
622
|
+
# Supports the following OAuth grant types: Authorization Code, Refresh
|
|
623
|
+
# Token, JWT Bearer, and Token Exchange. Specify one of the following
|
|
624
|
+
# values, depending on the grant type that you want:
|
|
625
|
+
#
|
|
626
|
+
# * Authorization Code - `authorization_code`
|
|
627
|
+
#
|
|
628
|
+
# * Refresh Token - `refresh_token`
|
|
629
|
+
#
|
|
630
|
+
# * JWT Bearer - `urn:ietf:params:oauth:grant-type:jwt-bearer`
|
|
631
|
+
#
|
|
632
|
+
# * Token Exchange - `urn:ietf:params:oauth:grant-type:token-exchange`
|
|
633
|
+
#
|
|
634
|
+
# @option params [String] :code
|
|
635
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
636
|
+
# This short-lived code is used to identify this authorization request.
|
|
637
|
+
# The code is obtained through a redirect from IAM Identity Center to a
|
|
638
|
+
# redirect URI persisted in the Authorization Code GrantOptions for the
|
|
639
|
+
# application.
|
|
640
|
+
#
|
|
641
|
+
# @option params [String] :refresh_token
|
|
642
|
+
# Used only when calling this API for the Refresh Token grant type. This
|
|
643
|
+
# token is used to refresh short-lived tokens, such as the access token,
|
|
644
|
+
# that might expire.
|
|
645
|
+
#
|
|
646
|
+
# For more information about the features and limitations of the current
|
|
647
|
+
# IAM Identity Center OIDC implementation, see *Considerations for Using
|
|
648
|
+
# this Guide* in the [IAM Identity Center OIDC API Reference][1].
|
|
649
|
+
#
|
|
650
|
+
#
|
|
651
|
+
#
|
|
652
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
|
|
653
|
+
#
|
|
654
|
+
# @option params [String] :assertion
|
|
655
|
+
# Used only when calling this API for the JWT Bearer grant type. This
|
|
656
|
+
# value specifies the JSON Web Token (JWT) issued by a trusted token
|
|
657
|
+
# issuer. To authorize a trusted token issuer, configure the JWT Bearer
|
|
658
|
+
# GrantOptions for the application.
|
|
659
|
+
#
|
|
660
|
+
# @option params [Array<String>] :scope
|
|
661
|
+
# The list of scopes for which authorization is requested. The access
|
|
662
|
+
# token that is issued is limited to the scopes that are granted. If the
|
|
663
|
+
# value is not specified, IAM Identity Center authorizes all scopes
|
|
664
|
+
# configured for the application, including the following default
|
|
665
|
+
# scopes: `openid`, `aws`, `sts:identity_context`.
|
|
666
|
+
#
|
|
667
|
+
# @option params [String] :redirect_uri
|
|
668
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
669
|
+
# This value specifies the location of the client or application that
|
|
670
|
+
# has registered to receive the authorization code.
|
|
671
|
+
#
|
|
672
|
+
# @option params [String] :subject_token
|
|
673
|
+
# Used only when calling this API for the Token Exchange grant type.
|
|
674
|
+
# This value specifies the subject of the exchange. The value of the
|
|
675
|
+
# subject token must be an access token issued by IAM Identity Center to
|
|
676
|
+
# a different client or application. The access token must have
|
|
677
|
+
# authorized scopes that indicate the requested application as a target
|
|
678
|
+
# audience.
|
|
679
|
+
#
|
|
680
|
+
# @option params [String] :subject_token_type
|
|
681
|
+
# Used only when calling this API for the Token Exchange grant type.
|
|
682
|
+
# This value specifies the type of token that is passed as the subject
|
|
683
|
+
# of the exchange. The following value is supported:
|
|
684
|
+
#
|
|
685
|
+
# * Access Token - `urn:ietf:params:oauth:token-type:access_token`
|
|
686
|
+
#
|
|
687
|
+
# @option params [String] :requested_token_type
|
|
688
|
+
# Used only when calling this API for the Token Exchange grant type.
|
|
689
|
+
# This value specifies the type of token that the requester can receive.
|
|
690
|
+
# The following values are supported:
|
|
691
|
+
#
|
|
692
|
+
# * Access Token - `urn:ietf:params:oauth:token-type:access_token`
|
|
693
|
+
#
|
|
694
|
+
# * Refresh Token - `urn:ietf:params:oauth:token-type:refresh_token`
|
|
695
|
+
#
|
|
696
|
+
# @option params [String] :code_verifier
|
|
697
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
698
|
+
# This value is generated by the client and presented to validate the
|
|
699
|
+
# original code challenge value the client passed at authorization time.
|
|
700
|
+
#
|
|
701
|
+
# @return [Types::CreateTokenWithIAMResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
702
|
+
#
|
|
703
|
+
# * {Types::CreateTokenWithIAMResponse#access_token #access_token} => String
|
|
704
|
+
# * {Types::CreateTokenWithIAMResponse#token_type #token_type} => String
|
|
705
|
+
# * {Types::CreateTokenWithIAMResponse#expires_in #expires_in} => Integer
|
|
706
|
+
# * {Types::CreateTokenWithIAMResponse#refresh_token #refresh_token} => String
|
|
707
|
+
# * {Types::CreateTokenWithIAMResponse#id_token #id_token} => String
|
|
708
|
+
# * {Types::CreateTokenWithIAMResponse#issued_token_type #issued_token_type} => String
|
|
709
|
+
# * {Types::CreateTokenWithIAMResponse#scope #scope} => Array<String>
|
|
710
|
+
# * {Types::CreateTokenWithIAMResponse#aws_additional_details #aws_additional_details} => Types::AwsAdditionalDetails
|
|
711
|
+
#
|
|
712
|
+
#
|
|
713
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
|
|
714
|
+
#
|
|
715
|
+
# resp = client.create_token_with_iam({
|
|
716
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
717
|
+
# code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzg0In0EXAMPLEAUTHCODE",
|
|
718
|
+
# grant_type: "authorization_code",
|
|
719
|
+
# redirect_uri: "https://mywebapp.example/redirect",
|
|
720
|
+
# scope: [
|
|
721
|
+
# "openid",
|
|
722
|
+
# "aws",
|
|
723
|
+
# "sts:identity_context",
|
|
724
|
+
# ],
|
|
725
|
+
# })
|
|
726
|
+
#
|
|
727
|
+
# resp.to_h outputs the following:
|
|
728
|
+
# {
|
|
729
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
730
|
+
# aws_additional_details: {
|
|
731
|
+
# identity_context: "EXAMPLEIDENTITYCONTEXT",
|
|
732
|
+
# },
|
|
733
|
+
# expires_in: 1579729529,
|
|
734
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
|
|
735
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
|
736
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
737
|
+
# scope: [
|
|
738
|
+
# "openid",
|
|
739
|
+
# "aws",
|
|
740
|
+
# "sts:identity_context",
|
|
741
|
+
# ],
|
|
742
|
+
# token_type: "Bearer",
|
|
743
|
+
# }
|
|
744
|
+
#
|
|
745
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with IAM authentication
|
|
746
|
+
#
|
|
747
|
+
# resp = client.create_token_with_iam({
|
|
748
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
749
|
+
# grant_type: "refresh_token",
|
|
750
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
751
|
+
# })
|
|
752
|
+
#
|
|
753
|
+
# resp.to_h outputs the following:
|
|
754
|
+
# {
|
|
755
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
756
|
+
# expires_in: 1579729529,
|
|
757
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
|
758
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
759
|
+
# scope: [
|
|
760
|
+
# "openid",
|
|
761
|
+
# "aws",
|
|
762
|
+
# "sts:identity_context",
|
|
763
|
+
# ],
|
|
764
|
+
# token_type: "Bearer",
|
|
765
|
+
# }
|
|
766
|
+
#
|
|
767
|
+
# @example Example: Call OAuth/OIDC /token endpoint for JWT Bearer grant with IAM authentication
|
|
768
|
+
#
|
|
769
|
+
# resp = client.create_token_with_iam({
|
|
770
|
+
# assertion: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjFMVE16YWtpaGlSbGFfOHoyQkVKVlhlV01xbyJ9.eyJ2ZXIiOiIyLjAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vOTEyMjA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkL3YyLjAiLCJzdWIiOiJBQUFBQUFBQUFBQUFBQUFBQUFBQUFJa3pxRlZyU2FTYUZIeTc4MmJidGFRIiwiYXVkIjoiNmNiMDQwMTgtYTNmNS00NmE3LWI5OTUtOTQwYzc4ZjVhZWYzIiwiZXhwIjoxNTM2MzYxNDExLCJpYXQiOjE1MzYyNzQ3MTEsIm5iZiI6MTUzNjI3NDcxMSwibmFtZSI6IkFiZSBMaW5jb2xuIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQWJlTGlAbWljcm9zb2Z0LmNvbSIsIm9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC02NmYzLTMzMzJlY2E3ZWE4MSIsInRpZCI6IjkxMjIwNDBkLTZjNjctNGM1Yi1iMTEyLTM2YTMwNGI2NmRhZCIsIm5vbmNlIjoiMTIzNTIzIiwiYWlvIjoiRGYyVVZYTDFpeCFsTUNXTVNPSkJjRmF0emNHZnZGR2hqS3Y4cTVnMHg3MzJkUjVNQjVCaXN2R1FPN1lXQnlqZDhpUURMcSFlR2JJRGFreXA1bW5PcmNkcUhlWVNubHRlcFFtUnA2QUlaOGpZIn0.1AFWW-Ck5nROwSlltm7GzZvDwUkqvhSQpm55TQsmVo9Y59cLhRXpvB8n-55HCr9Z6G_31_UbeUkoz612I2j_Sm9FFShSDDjoaLQr54CreGIJvjtmS3EkK9a7SJBbcpL1MpUtlfygow39tFjY7EVNW9plWUvRrTgVk7lYLprvfzw-CIqw3gHC-T7IK_m_xkr08INERBtaecwhTeN4chPC4W3jdmw_lIxzC48YoQ0dB1L9-ImX98Egypfrlbm0IBL5spFzL6JDZIRRJOu8vecJvj1mq-IUhGt0MacxX8jdxYLP-KUu2d9MbNKpCKJuZ7p8gwTL5B7NlUdh_dmSviPWrw",
|
|
771
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
772
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
|
773
|
+
# })
|
|
774
|
+
#
|
|
775
|
+
# resp.to_h outputs the following:
|
|
776
|
+
# {
|
|
777
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
778
|
+
# aws_additional_details: {
|
|
779
|
+
# identity_context: "EXAMPLEIDENTITYCONTEXT",
|
|
780
|
+
# },
|
|
781
|
+
# expires_in: 1579729529,
|
|
782
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
|
|
783
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
|
784
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
785
|
+
# scope: [
|
|
786
|
+
# "openid",
|
|
787
|
+
# "aws",
|
|
788
|
+
# "sts:identity_context",
|
|
789
|
+
# ],
|
|
790
|
+
# token_type: "Bearer",
|
|
791
|
+
# }
|
|
792
|
+
#
|
|
793
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Token Exchange grant with IAM authentication
|
|
794
|
+
#
|
|
795
|
+
# resp = client.create_token_with_iam({
|
|
796
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
797
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
|
|
798
|
+
# requested_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
799
|
+
# subject_token: "aoak-Hig8TUDPNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZDIFFERENTACCESSTOKEN",
|
|
800
|
+
# subject_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
801
|
+
# })
|
|
802
|
+
#
|
|
803
|
+
# resp.to_h outputs the following:
|
|
804
|
+
# {
|
|
805
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
806
|
+
# aws_additional_details: {
|
|
807
|
+
# identity_context: "EXAMPLEIDENTITYCONTEXT",
|
|
808
|
+
# },
|
|
809
|
+
# expires_in: 1579729529,
|
|
810
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
|
|
811
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
812
|
+
# scope: [
|
|
813
|
+
# "openid",
|
|
814
|
+
# "aws",
|
|
815
|
+
# "sts:identity_context",
|
|
816
|
+
# ],
|
|
817
|
+
# token_type: "Bearer",
|
|
818
|
+
# }
|
|
819
|
+
#
|
|
820
|
+
# @example Request syntax with placeholder values
|
|
821
|
+
#
|
|
822
|
+
# resp = client.create_token_with_iam({
|
|
823
|
+
# client_id: "ClientId", # required
|
|
824
|
+
# grant_type: "GrantType", # required
|
|
825
|
+
# code: "AuthCode",
|
|
826
|
+
# refresh_token: "RefreshToken",
|
|
827
|
+
# assertion: "Assertion",
|
|
828
|
+
# scope: ["Scope"],
|
|
829
|
+
# redirect_uri: "URI",
|
|
830
|
+
# subject_token: "SubjectToken",
|
|
831
|
+
# subject_token_type: "TokenTypeURI",
|
|
832
|
+
# requested_token_type: "TokenTypeURI",
|
|
833
|
+
# code_verifier: "CodeVerifier",
|
|
834
|
+
# })
|
|
835
|
+
#
|
|
836
|
+
# @example Response structure
|
|
837
|
+
#
|
|
838
|
+
# resp.access_token #=> String
|
|
839
|
+
# resp.token_type #=> String
|
|
840
|
+
# resp.expires_in #=> Integer
|
|
841
|
+
# resp.refresh_token #=> String
|
|
842
|
+
# resp.id_token #=> String
|
|
843
|
+
# resp.issued_token_type #=> String
|
|
844
|
+
# resp.scope #=> Array
|
|
845
|
+
# resp.scope[0] #=> String
|
|
846
|
+
# resp.aws_additional_details.identity_context #=> String
|
|
847
|
+
#
|
|
848
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM AWS API Documentation
|
|
849
|
+
#
|
|
850
|
+
# @overload create_token_with_iam(params = {})
|
|
851
|
+
# @param [Hash] params ({})
|
|
852
|
+
def create_token_with_iam(params = {}, options = {})
|
|
853
|
+
req = build_request(:create_token_with_iam, params)
|
|
854
|
+
req.send_request(options)
|
|
855
|
+
end
|
|
856
|
+
|
|
857
|
+
# Registers a public client with IAM Identity Center. This allows
|
|
858
|
+
# clients to perform authorization using the authorization
|
|
859
|
+
# code grant with Proof Key for Code Exchange (PKCE) or the device
|
|
860
|
+
# code grant.
|
|
468
861
|
#
|
|
469
862
|
# @option params [required, String] :client_name
|
|
470
863
|
# The friendly name of the client.
|
|
@@ -478,6 +871,35 @@ module Aws::SSOOIDC
|
|
|
478
871
|
# this list is used to restrict permissions when granting an access
|
|
479
872
|
# token.
|
|
480
873
|
#
|
|
874
|
+
# @option params [Array<String>] :redirect_uris
|
|
875
|
+
# The list of redirect URI that are defined by the client. At completion
|
|
876
|
+
# of authorization, this list is used to restrict what locations the
|
|
877
|
+
# user agent can be redirected back to.
|
|
878
|
+
#
|
|
879
|
+
# @option params [Array<String>] :grant_types
|
|
880
|
+
# The list of OAuth 2.0 grant types that are defined by the client. This
|
|
881
|
+
# list is used to restrict the token granting flows available to the
|
|
882
|
+
# client. Supports the following OAuth 2.0 grant types: Authorization
|
|
883
|
+
# Code, Device Code, and Refresh Token.
|
|
884
|
+
#
|
|
885
|
+
# * Authorization Code - `authorization_code`
|
|
886
|
+
#
|
|
887
|
+
# * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
|
|
888
|
+
#
|
|
889
|
+
# * Refresh Token - `refresh_token`
|
|
890
|
+
#
|
|
891
|
+
# @option params [String] :issuer_url
|
|
892
|
+
# The IAM Identity Center Issuer URL associated with an instance of IAM
|
|
893
|
+
# Identity Center. This value is needed for user access to resources
|
|
894
|
+
# through the client.
|
|
895
|
+
#
|
|
896
|
+
# @option params [String] :entitled_application_arn
|
|
897
|
+
# This IAM Identity Center application ARN is used to define
|
|
898
|
+
# administrator-managed configuration for public client access to
|
|
899
|
+
# resources. At authorization, the scopes, grants, and redirect URI
|
|
900
|
+
# available to this client will be restricted by this application
|
|
901
|
+
# resource.
|
|
902
|
+
#
|
|
481
903
|
# @return [Types::RegisterClientResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
482
904
|
#
|
|
483
905
|
# * {Types::RegisterClientResponse#client_id #client_id} => String
|
|
@@ -487,12 +909,45 @@ module Aws::SSOOIDC
|
|
|
487
909
|
# * {Types::RegisterClientResponse#authorization_endpoint #authorization_endpoint} => String
|
|
488
910
|
# * {Types::RegisterClientResponse#token_endpoint #token_endpoint} => String
|
|
489
911
|
#
|
|
912
|
+
#
|
|
913
|
+
# @example Example: Call OAuth/OIDC /register-client endpoint
|
|
914
|
+
#
|
|
915
|
+
# resp = client.register_client({
|
|
916
|
+
# client_name: "My IDE Plugin",
|
|
917
|
+
# client_type: "public",
|
|
918
|
+
# entitled_application_arn: "arn:aws:sso::ACCOUNTID:application/ssoins-1111111111111111/apl-1111111111111111",
|
|
919
|
+
# grant_types: [
|
|
920
|
+
# "authorization_code",
|
|
921
|
+
# "refresh_token",
|
|
922
|
+
# ],
|
|
923
|
+
# issuer_url: "https://identitycenter.amazonaws.com/ssoins-1111111111111111",
|
|
924
|
+
# redirect_uris: [
|
|
925
|
+
# "127.0.0.1:PORT/oauth/callback",
|
|
926
|
+
# ],
|
|
927
|
+
# scopes: [
|
|
928
|
+
# "sso:account:access",
|
|
929
|
+
# "codewhisperer:completions",
|
|
930
|
+
# ],
|
|
931
|
+
# })
|
|
932
|
+
#
|
|
933
|
+
# resp.to_h outputs the following:
|
|
934
|
+
# {
|
|
935
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
936
|
+
# client_id_issued_at: 1579725929,
|
|
937
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
938
|
+
# client_secret_expires_at: 1587584729,
|
|
939
|
+
# }
|
|
940
|
+
#
|
|
490
941
|
# @example Request syntax with placeholder values
|
|
491
942
|
#
|
|
492
943
|
# resp = client.register_client({
|
|
493
944
|
# client_name: "ClientName", # required
|
|
494
945
|
# client_type: "ClientType", # required
|
|
495
946
|
# scopes: ["Scope"],
|
|
947
|
+
# redirect_uris: ["URI"],
|
|
948
|
+
# grant_types: ["GrantType"],
|
|
949
|
+
# issuer_url: "URI",
|
|
950
|
+
# entitled_application_arn: "ArnType",
|
|
496
951
|
# })
|
|
497
952
|
#
|
|
498
953
|
# @example Response structure
|
|
@@ -526,8 +981,9 @@ module Aws::SSOOIDC
|
|
|
526
981
|
# come from the persisted result of the RegisterClient API operation.
|
|
527
982
|
#
|
|
528
983
|
# @option params [required, String] :start_url
|
|
529
|
-
# The URL for the
|
|
530
|
-
# the
|
|
984
|
+
# The URL for the Amazon Web Services access portal. For more
|
|
985
|
+
# information, see [Using the Amazon Web Services access portal][1] in
|
|
986
|
+
# the *IAM Identity Center User Guide*.
|
|
531
987
|
#
|
|
532
988
|
#
|
|
533
989
|
#
|
|
@@ -542,6 +998,25 @@ module Aws::SSOOIDC
|
|
|
542
998
|
# * {Types::StartDeviceAuthorizationResponse#expires_in #expires_in} => Integer
|
|
543
999
|
# * {Types::StartDeviceAuthorizationResponse#interval #interval} => Integer
|
|
544
1000
|
#
|
|
1001
|
+
#
|
|
1002
|
+
# @example Example: Call OAuth/OIDC /start-device-authorization endpoint
|
|
1003
|
+
#
|
|
1004
|
+
# resp = client.start_device_authorization({
|
|
1005
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
1006
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
1007
|
+
# start_url: "https://identitycenter.amazonaws.com/ssoins-111111111111",
|
|
1008
|
+
# })
|
|
1009
|
+
#
|
|
1010
|
+
# resp.to_h outputs the following:
|
|
1011
|
+
# {
|
|
1012
|
+
# device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
|
|
1013
|
+
# expires_in: 1579729529,
|
|
1014
|
+
# interval: 1,
|
|
1015
|
+
# user_code: "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
|
|
1016
|
+
# verification_uri: "https://directory-alias-example.awsapps.com/start/#/device",
|
|
1017
|
+
# verification_uri_complete: "https://directory-alias-example.awsapps.com/start/#/device?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
|
|
1018
|
+
# }
|
|
1019
|
+
#
|
|
545
1020
|
# @example Request syntax with placeholder values
|
|
546
1021
|
#
|
|
547
1022
|
# resp = client.start_device_authorization({
|
|
@@ -574,14 +1049,19 @@ module Aws::SSOOIDC
|
|
|
574
1049
|
# @api private
|
|
575
1050
|
def build_request(operation_name, params = {})
|
|
576
1051
|
handlers = @handlers.for(operation_name)
|
|
1052
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
|
1053
|
+
Aws::Telemetry.module_to_tracer_name('Aws::SSOOIDC')
|
|
1054
|
+
)
|
|
577
1055
|
context = Seahorse::Client::RequestContext.new(
|
|
578
1056
|
operation_name: operation_name,
|
|
579
1057
|
operation: config.api.operation(operation_name),
|
|
580
1058
|
client: self,
|
|
581
1059
|
params: params,
|
|
582
|
-
config: config
|
|
1060
|
+
config: config,
|
|
1061
|
+
tracer: tracer
|
|
1062
|
+
)
|
|
583
1063
|
context[:gem_name] = 'aws-sdk-core'
|
|
584
|
-
context[:gem_version] = '3.
|
|
1064
|
+
context[:gem_version] = '3.224.1'
|
|
585
1065
|
Seahorse::Client::Request.new(handlers, context)
|
|
586
1066
|
end
|
|
587
1067
|
|