aws-sdk-core 3.173.0 → 3.254.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 +947 -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 +21 -13
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +16 -9
- 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 +309 -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 +39 -55
- data/lib/aws-sdk-core/credential_provider.rb +8 -1
- data/lib/aws-sdk-core/credential_provider_chain.rb +101 -25
- 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 +104 -26
- data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
- data/lib/aws-sdk-core/endpoints/matchers.rb +21 -19
- data/lib/aws-sdk-core/endpoints.rb +106 -22
- data/lib/aws-sdk-core/error_handler.rb +46 -0
- data/lib/aws-sdk-core/errors.rb +17 -5
- data/lib/aws-sdk-core/event_emitter.rb +1 -17
- data/lib/aws-sdk-core/ini_parser.rb +7 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +181 -158
- data/lib/aws-sdk-core/json/builder.rb +23 -1
- data/lib/aws-sdk-core/json/error_handler.rb +31 -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/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/login_credentials.rb +230 -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 +437 -201
- 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 +78 -56
- 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/retries/clock_skew.rb +28 -16
- data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +11 -8
- data/lib/aws-sdk-core/plugins/retry_errors.rb +211 -110
- data/lib/aws-sdk-core/plugins/sign.rb +55 -33
- 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 +59 -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 +205 -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 +20 -23
- 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 +95 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +98 -0
- data/lib/aws-sdk-core/rpc_v2.rb +69 -0
- data/lib/aws-sdk-core/shared_config.rb +155 -39
- data/lib/aws-sdk-core/shared_credentials.rb +1 -7
- data/lib/aws-sdk-core/sso_credentials.rb +6 -3
- data/lib/aws-sdk-core/sso_token_provider.rb +1 -0
- data/lib/aws-sdk-core/static_token_provider.rb +1 -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/token.rb +3 -3
- data/lib/aws-sdk-core/token_provider.rb +4 -0
- data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
- data/lib/aws-sdk-core/util.rb +41 -1
- 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 +35 -43
- 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 +86 -107
- data/lib/aws-sdk-signin/client.rb +1008 -0
- data/lib/aws-sdk-signin/client_api.rb +444 -0
- data/lib/aws-sdk-signin/customizations.rb +1 -0
- data/lib/aws-sdk-signin/endpoint_parameters.rb +85 -0
- data/lib/aws-sdk-signin/endpoint_provider.rb +107 -0
- data/lib/aws-sdk-signin/endpoints.rb +133 -0
- data/lib/aws-sdk-signin/errors.rb +185 -0
- data/lib/aws-sdk-signin/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-signin/resource.rb +26 -0
- data/lib/aws-sdk-signin/types.rb +909 -0
- data/lib/aws-sdk-signin.rb +63 -0
- data/lib/aws-sdk-sso/client.rb +210 -99
- data/lib/aws-sdk-sso/client_api.rb +7 -0
- data/lib/aws-sdk-sso/endpoint_parameters.rb +13 -10
- data/lib/aws-sdk-sso/endpoint_provider.rb +30 -28
- 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 +630 -132
- data/lib/aws-sdk-ssooidc/client_api.rb +94 -1
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +13 -10
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +30 -28
- data/lib/aws-sdk-ssooidc/endpoints.rb +3 -40
- data/lib/aws-sdk-ssooidc/errors.rb +62 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +23 -20
- data/lib/aws-sdk-ssooidc/types.rb +419 -53
- data/lib/aws-sdk-ssooidc.rb +15 -11
- data/lib/aws-sdk-sts/client.rb +567 -158
- data/lib/aws-sdk-sts/client_api.rb +120 -9
- data/lib/aws-sdk-sts/customizations.rb +5 -2
- data/lib/aws-sdk-sts/endpoint_parameters.rb +15 -14
- data/lib/aws-sdk-sts/endpoint_provider.rb +52 -57
- data/lib/aws-sdk-sts/endpoints.rb +3 -118
- data/lib/aws-sdk-sts/errors.rb +79 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +23 -30
- data/lib/aws-sdk-sts/presigner.rb +3 -7
- data/lib/aws-sdk-sts/types.rb +382 -31
- 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 +18 -28
- data/lib/seahorse/client/h2/handler.rb +19 -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 +15 -12
- data/lib/seahorse/client/net_http/handler.rb +21 -9
- data/lib/seahorse/client/net_http/patches.rb +44 -14
- 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 +9 -2
- 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/lib/seahorse/util.rb +2 -1
- 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 +118 -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/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
|
@@ -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,23 +72,31 @@ 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
|
-
# Your AWS credentials. This can be
|
|
90
|
-
# following classes:
|
|
98
|
+
# Your AWS credentials used for authentication. This can be any class that includes and implements
|
|
99
|
+
# `Aws::CredentialProvider`, or instance of any one of the following classes:
|
|
91
100
|
#
|
|
92
101
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
|
93
102
|
# credentials.
|
|
@@ -115,20 +124,24 @@ module Aws::SSOOIDC
|
|
|
115
124
|
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
|
116
125
|
# from the Cognito Identity service.
|
|
117
126
|
#
|
|
118
|
-
# When `:credentials` are not configured directly, the following
|
|
119
|
-
# locations will be searched for credentials:
|
|
127
|
+
# When `:credentials` are not configured directly, the following locations will be searched for credentials:
|
|
120
128
|
#
|
|
121
129
|
# * `Aws.config[:credentials]`
|
|
122
|
-
#
|
|
123
|
-
# *
|
|
130
|
+
#
|
|
131
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
|
132
|
+
# `:account_id` options.
|
|
133
|
+
#
|
|
134
|
+
# * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
|
|
135
|
+
# `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
|
|
136
|
+
#
|
|
124
137
|
# * `~/.aws/credentials`
|
|
138
|
+
#
|
|
125
139
|
# * `~/.aws/config`
|
|
126
|
-
#
|
|
127
|
-
#
|
|
128
|
-
# `Aws::
|
|
129
|
-
# enable retries and extended timeouts. Instance profile credential
|
|
130
|
-
#
|
|
131
|
-
# to true.
|
|
140
|
+
#
|
|
141
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive.
|
|
142
|
+
# Construct and pass an instance of `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
|
143
|
+
# enable retries and extended timeouts. Instance profile credential fetching can be disabled by
|
|
144
|
+
# setting `ENV['AWS_EC2_METADATA_DISABLED']` to `true`.
|
|
132
145
|
#
|
|
133
146
|
# @option options [required, String] :region
|
|
134
147
|
# The AWS region to connect to. The configured `:region` is
|
|
@@ -144,6 +157,8 @@ module Aws::SSOOIDC
|
|
|
144
157
|
#
|
|
145
158
|
# @option options [String] :access_key_id
|
|
146
159
|
#
|
|
160
|
+
# @option options [String] :account_id
|
|
161
|
+
#
|
|
147
162
|
# @option options [Boolean] :active_endpoint_cache (false)
|
|
148
163
|
# When set to `true`, a thread polling for endpoints will be running in
|
|
149
164
|
# the background every 60 secs (default). Defaults to `false`.
|
|
@@ -154,6 +169,11 @@ module Aws::SSOOIDC
|
|
|
154
169
|
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
|
155
170
|
# not retry instead of sleeping.
|
|
156
171
|
#
|
|
172
|
+
# @option options [Array<String>] :auth_scheme_preference
|
|
173
|
+
# A list of preferred authentication schemes to use when making a request. Supported values are:
|
|
174
|
+
# `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
|
|
175
|
+
# shared config as `auth_scheme_preference`, the value should be a comma-separated list.
|
|
176
|
+
#
|
|
157
177
|
# @option options [Boolean] :client_side_monitoring (false)
|
|
158
178
|
# When `true`, client-side metrics will be collected for all API requests from
|
|
159
179
|
# this client.
|
|
@@ -179,7 +199,7 @@ module Aws::SSOOIDC
|
|
|
179
199
|
# the required types.
|
|
180
200
|
#
|
|
181
201
|
# @option options [Boolean] :correct_clock_skew (true)
|
|
182
|
-
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
|
202
|
+
# Used only in `standard` and `adaptive` retry modes. Specifies whether to apply
|
|
183
203
|
# a clock skew correction and retry requests with skewed client clocks.
|
|
184
204
|
#
|
|
185
205
|
# @option options [String] :defaults_mode ("legacy")
|
|
@@ -187,13 +207,22 @@ module Aws::SSOOIDC
|
|
|
187
207
|
# accepted modes and the configuration defaults that are included.
|
|
188
208
|
#
|
|
189
209
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
|
190
|
-
#
|
|
191
|
-
#
|
|
210
|
+
# When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
|
|
211
|
+
#
|
|
212
|
+
# @option options [Boolean] :disable_request_compression (false)
|
|
213
|
+
# When set to 'true' the request body will not be compressed
|
|
214
|
+
# for supported operations.
|
|
215
|
+
#
|
|
216
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
|
217
|
+
# Normally you should not configure the `:endpoint` option
|
|
218
|
+
# directly. This is normally constructed from the `:region`
|
|
219
|
+
# option. Configuring `:endpoint` is normally reserved for
|
|
220
|
+
# connecting to test or custom endpoints. The endpoint should
|
|
221
|
+
# be a URI formatted like:
|
|
192
222
|
#
|
|
193
|
-
#
|
|
194
|
-
#
|
|
195
|
-
#
|
|
196
|
-
# to test or custom endpoints. This should be a valid HTTP(S) URI.
|
|
223
|
+
# 'http://example.com'
|
|
224
|
+
# 'https://example.com'
|
|
225
|
+
# 'http://example.com:123'
|
|
197
226
|
#
|
|
198
227
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
|
199
228
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
|
@@ -210,6 +239,10 @@ module Aws::SSOOIDC
|
|
|
210
239
|
# @option options [Boolean] :endpoint_discovery (false)
|
|
211
240
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
|
212
241
|
#
|
|
242
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
|
243
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
|
244
|
+
# variables and the shared configuration file.
|
|
245
|
+
#
|
|
213
246
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
|
214
247
|
# The log formatter.
|
|
215
248
|
#
|
|
@@ -227,8 +260,36 @@ module Aws::SSOOIDC
|
|
|
227
260
|
# 4 times. Used in `standard` and `adaptive` retry modes.
|
|
228
261
|
#
|
|
229
262
|
# @option options [String] :profile ("default")
|
|
230
|
-
# Used when loading credentials from the shared credentials file
|
|
231
|
-
#
|
|
263
|
+
# Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
|
|
264
|
+
# When not specified, 'default' is used.
|
|
265
|
+
#
|
|
266
|
+
# @option options [String] :request_checksum_calculation ("when_supported")
|
|
267
|
+
# Determines when a checksum will be calculated for request payloads. Values are:
|
|
268
|
+
#
|
|
269
|
+
# * `when_supported` - (default) When set, a checksum will be
|
|
270
|
+
# calculated for all request payloads of operations modeled with the
|
|
271
|
+
# `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
|
|
272
|
+
# `requestAlgorithmMember` is modeled.
|
|
273
|
+
# * `when_required` - When set, a checksum will only be calculated for
|
|
274
|
+
# request payloads of operations modeled with the `httpChecksum` trait where
|
|
275
|
+
# `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
|
|
276
|
+
# is modeled and supplied.
|
|
277
|
+
#
|
|
278
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
|
279
|
+
# The minimum size in bytes that triggers compression for request
|
|
280
|
+
# bodies. The value must be non-negative integer value between 0
|
|
281
|
+
# and 10485780 bytes inclusive.
|
|
282
|
+
#
|
|
283
|
+
# @option options [String] :response_checksum_validation ("when_supported")
|
|
284
|
+
# Determines when checksum validation will be performed on response payloads. Values are:
|
|
285
|
+
#
|
|
286
|
+
# * `when_supported` - (default) When set, checksum validation is performed on all
|
|
287
|
+
# response payloads of operations modeled with the `httpChecksum` trait where
|
|
288
|
+
# `responseAlgorithms` is modeled, except when no modeled checksum algorithms
|
|
289
|
+
# are supported.
|
|
290
|
+
# * `when_required` - When set, checksum validation is not performed on
|
|
291
|
+
# response payloads of operations unless the checksum algorithm is supported and
|
|
292
|
+
# the `requestValidationModeMember` member is set to `ENABLED`.
|
|
232
293
|
#
|
|
233
294
|
# @option options [Proc] :retry_backoff
|
|
234
295
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
|
@@ -262,23 +323,35 @@ module Aws::SSOOIDC
|
|
|
262
323
|
# @option options [String] :retry_mode ("legacy")
|
|
263
324
|
# Specifies which retry algorithm to use. Values are:
|
|
264
325
|
#
|
|
265
|
-
# * `legacy` - The pre-existing retry behavior.
|
|
266
|
-
# no retry mode is provided.
|
|
326
|
+
# * `legacy` - The pre-existing retry behavior. This is the default
|
|
327
|
+
# value if no retry mode is provided.
|
|
267
328
|
#
|
|
268
329
|
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
|
269
330
|
# This includes support for retry quotas, which limit the number of
|
|
270
331
|
# unsuccessful retries a client can make.
|
|
271
332
|
#
|
|
272
|
-
# * `adaptive` -
|
|
273
|
-
#
|
|
274
|
-
# throttling. This is a provisional mode that may change behavior
|
|
275
|
-
# in the future.
|
|
333
|
+
# * `adaptive` - A retry mode that includes all the functionality of
|
|
334
|
+
# `standard` mode along with automatic client side throttling.
|
|
276
335
|
#
|
|
336
|
+
# @option options [String] :sdk_ua_app_id
|
|
337
|
+
# A unique and opaque application ID that is appended to the
|
|
338
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
|
339
|
+
# maximum length of 50. This variable is sourced from environment
|
|
340
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
|
277
341
|
#
|
|
278
342
|
# @option options [String] :secret_access_key
|
|
279
343
|
#
|
|
280
344
|
# @option options [String] :session_token
|
|
281
345
|
#
|
|
346
|
+
# @option options [Array] :sigv4a_signing_region_set
|
|
347
|
+
# A list of regions that should be signed with SigV4a signing. When
|
|
348
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
|
349
|
+
# in the following locations:
|
|
350
|
+
#
|
|
351
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
|
352
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
|
353
|
+
# * `~/.aws/config`
|
|
354
|
+
#
|
|
282
355
|
# @option options [Boolean] :stub_responses (false)
|
|
283
356
|
# Causes the client to return stubbed responses. By default
|
|
284
357
|
# fake responses are generated and returned. You can specify
|
|
@@ -288,9 +361,19 @@ module Aws::SSOOIDC
|
|
|
288
361
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
|
289
362
|
# requests are made, and retries are disabled.
|
|
290
363
|
#
|
|
364
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
|
365
|
+
# Allows you to provide a telemetry provider, which is used to
|
|
366
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
|
367
|
+
# will not record or emit any telemetry data. The SDK supports the
|
|
368
|
+
# following telemetry providers:
|
|
369
|
+
#
|
|
370
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
|
371
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
|
372
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
|
373
|
+
#
|
|
291
374
|
# @option options [Aws::TokenProvider] :token_provider
|
|
292
|
-
#
|
|
293
|
-
# following classes:
|
|
375
|
+
# Your Bearer token used for authentication. This can be any class that includes and implements
|
|
376
|
+
# `Aws::TokenProvider`, or instance of any one of the following classes:
|
|
294
377
|
#
|
|
295
378
|
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
|
296
379
|
# tokens.
|
|
@@ -315,52 +398,75 @@ module Aws::SSOOIDC
|
|
|
315
398
|
# sending the request.
|
|
316
399
|
#
|
|
317
400
|
# @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
|
-
#
|
|
401
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
|
402
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
|
403
|
+
# `Aws::SSOOIDC::EndpointParameters`.
|
|
404
|
+
#
|
|
405
|
+
# @option options [Float] :http_continue_timeout (1)
|
|
406
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
|
407
|
+
# request body. This option has no effect unless the request has "Expect"
|
|
408
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
|
409
|
+
# behaviour. This value can safely be set per request on the session.
|
|
410
|
+
#
|
|
411
|
+
# @option options [Float] :http_idle_timeout (5)
|
|
412
|
+
# The number of seconds a connection is allowed to sit idle before it
|
|
413
|
+
# is considered stale. Stale connections are closed and removed from the
|
|
414
|
+
# pool before making a request.
|
|
415
|
+
#
|
|
416
|
+
# @option options [Float] :http_open_timeout (15)
|
|
417
|
+
# The default number of seconds to wait for response data.
|
|
418
|
+
# This value can safely be set per-request on the session.
|
|
419
|
+
#
|
|
420
|
+
# @option options [URI::HTTP,String] :http_proxy
|
|
421
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
|
422
|
+
#
|
|
423
|
+
# @option options [Float] :http_read_timeout (60)
|
|
424
|
+
# The default number of seconds to wait for response data.
|
|
425
|
+
# This value can safely be set per-request on the session.
|
|
426
|
+
#
|
|
427
|
+
# @option options [Boolean] :http_wire_trace (false)
|
|
428
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
|
429
|
+
#
|
|
430
|
+
# @option options [Proc] :on_chunk_received
|
|
431
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
432
|
+
# of the response body is received. It provides three arguments: the chunk,
|
|
433
|
+
# the number of bytes received, and the total number of
|
|
434
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
|
435
|
+
#
|
|
436
|
+
# @option options [Proc] :on_chunk_sent
|
|
437
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
438
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
|
439
|
+
# the number of bytes read from the body, and the total number of
|
|
440
|
+
# bytes in the body.
|
|
441
|
+
#
|
|
442
|
+
# @option options [Boolean] :raise_response_errors (true)
|
|
443
|
+
# When `true`, response errors are raised.
|
|
444
|
+
#
|
|
445
|
+
# @option options [String] :ssl_ca_bundle
|
|
446
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
|
447
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
|
448
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
|
449
|
+
#
|
|
450
|
+
# @option options [String] :ssl_ca_directory
|
|
451
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
|
452
|
+
# authority files for verifying peer certificates. If you do
|
|
453
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
|
454
|
+
# default will be used if available.
|
|
335
455
|
#
|
|
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.
|
|
456
|
+
# @option options [String] :ssl_ca_store
|
|
457
|
+
# Sets the X509::Store to verify peer certificate.
|
|
342
458
|
#
|
|
343
|
-
# @option options [
|
|
344
|
-
#
|
|
459
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
|
460
|
+
# Sets a client certificate when creating http connections.
|
|
345
461
|
#
|
|
346
|
-
# @option options [
|
|
347
|
-
#
|
|
462
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
|
463
|
+
# Sets a client key when creating http connections.
|
|
348
464
|
#
|
|
349
|
-
# @option options [
|
|
350
|
-
#
|
|
351
|
-
# connection.
|
|
465
|
+
# @option options [Float] :ssl_timeout
|
|
466
|
+
# Sets the SSL timeout in seconds
|
|
352
467
|
#
|
|
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.
|
|
468
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
|
469
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
|
364
470
|
#
|
|
365
471
|
def initialize(*args)
|
|
366
472
|
super
|
|
@@ -368,61 +474,66 @@ module Aws::SSOOIDC
|
|
|
368
474
|
|
|
369
475
|
# @!group API Operations
|
|
370
476
|
|
|
371
|
-
# Creates and returns
|
|
372
|
-
# access token
|
|
373
|
-
#
|
|
477
|
+
# Creates and returns access and refresh tokens for clients that are
|
|
478
|
+
# authenticated using client secrets. The access token can be used to
|
|
479
|
+
# fetch short-lived credentials for the assigned AWS accounts or to
|
|
480
|
+
# access application APIs using `bearer` authentication.
|
|
374
481
|
#
|
|
375
482
|
# @option params [required, String] :client_id
|
|
376
|
-
# The unique identifier string for
|
|
377
|
-
# from the
|
|
483
|
+
# The unique identifier string for the client or application. This value
|
|
484
|
+
# comes from the result of the RegisterClient API.
|
|
378
485
|
#
|
|
379
486
|
# @option params [required, String] :client_secret
|
|
380
487
|
# A secret string generated for the client. This value should come from
|
|
381
488
|
# the persisted result of the RegisterClient API.
|
|
382
489
|
#
|
|
383
490
|
# @option params [required, String] :grant_type
|
|
384
|
-
# Supports
|
|
385
|
-
#
|
|
386
|
-
#
|
|
491
|
+
# Supports the following OAuth grant types: Authorization Code, Device
|
|
492
|
+
# Code, and Refresh Token. Specify one of the following values,
|
|
493
|
+
# depending on the grant type that you want:
|
|
387
494
|
#
|
|
388
|
-
#
|
|
495
|
+
# * Authorization Code - `authorization_code`
|
|
389
496
|
#
|
|
390
|
-
#
|
|
391
|
-
#
|
|
497
|
+
# * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
|
|
498
|
+
#
|
|
499
|
+
# * Refresh Token - `refresh_token`
|
|
392
500
|
#
|
|
393
501
|
# @option params [String] :device_code
|
|
394
|
-
# Used only when calling this API for the
|
|
395
|
-
# short-
|
|
396
|
-
#
|
|
397
|
-
# StartDeviceAuthorization API.
|
|
502
|
+
# Used only when calling this API for the Device Code grant type. This
|
|
503
|
+
# short-lived code is used to identify this authorization request. This
|
|
504
|
+
# comes from the result of the StartDeviceAuthorization API.
|
|
398
505
|
#
|
|
399
506
|
# @option params [String] :code
|
|
400
|
-
#
|
|
401
|
-
#
|
|
402
|
-
# access to a token.
|
|
507
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
508
|
+
# The short-lived code is used to identify this authorization request.
|
|
403
509
|
#
|
|
404
510
|
# @option params [String] :refresh_token
|
|
405
|
-
#
|
|
511
|
+
# Used only when calling this API for the Refresh Token grant type. This
|
|
512
|
+
# token is used to refresh short-lived tokens, such as the access token,
|
|
513
|
+
# that might expire.
|
|
514
|
+
#
|
|
406
515
|
# For more information about the features and limitations of the current
|
|
407
516
|
# IAM Identity Center OIDC implementation, see *Considerations for Using
|
|
408
517
|
# this Guide* in the [IAM Identity Center OIDC API Reference][1].
|
|
409
518
|
#
|
|
410
|
-
# The token used to obtain an access token in the event that the access
|
|
411
|
-
# token is invalid or expired.
|
|
412
|
-
#
|
|
413
519
|
#
|
|
414
520
|
#
|
|
415
521
|
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
|
|
416
522
|
#
|
|
417
523
|
# @option params [Array<String>] :scope
|
|
418
|
-
# The list of scopes
|
|
419
|
-
#
|
|
420
|
-
#
|
|
524
|
+
# The list of scopes for which authorization is requested. This
|
|
525
|
+
# parameter has no effect; the access token will always include all
|
|
526
|
+
# scopes configured during client registration.
|
|
421
527
|
#
|
|
422
528
|
# @option params [String] :redirect_uri
|
|
423
|
-
#
|
|
424
|
-
#
|
|
425
|
-
#
|
|
529
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
530
|
+
# This value specifies the location of the client or application that
|
|
531
|
+
# has registered to receive the authorization code.
|
|
532
|
+
#
|
|
533
|
+
# @option params [String] :code_verifier
|
|
534
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
535
|
+
# This value is generated by the client and presented to validate the
|
|
536
|
+
# original code challenge value the client passed at authorization time.
|
|
426
537
|
#
|
|
427
538
|
# @return [Types::CreateTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
428
539
|
#
|
|
@@ -432,6 +543,44 @@ module Aws::SSOOIDC
|
|
|
432
543
|
# * {Types::CreateTokenResponse#refresh_token #refresh_token} => String
|
|
433
544
|
# * {Types::CreateTokenResponse#id_token #id_token} => String
|
|
434
545
|
#
|
|
546
|
+
#
|
|
547
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Device Code grant with Secret authentication
|
|
548
|
+
#
|
|
549
|
+
# resp = client.create_token({
|
|
550
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
551
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
552
|
+
# device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
|
|
553
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:device-code",
|
|
554
|
+
# })
|
|
555
|
+
#
|
|
556
|
+
# resp.to_h outputs the following:
|
|
557
|
+
# {
|
|
558
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
559
|
+
# expires_in: 1579729529,
|
|
560
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
561
|
+
# token_type: "Bearer",
|
|
562
|
+
# }
|
|
563
|
+
#
|
|
564
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with Secret authentication
|
|
565
|
+
#
|
|
566
|
+
# resp = client.create_token({
|
|
567
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
568
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
569
|
+
# grant_type: "refresh_token",
|
|
570
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
571
|
+
# scope: [
|
|
572
|
+
# "codewhisperer:completions",
|
|
573
|
+
# ],
|
|
574
|
+
# })
|
|
575
|
+
#
|
|
576
|
+
# resp.to_h outputs the following:
|
|
577
|
+
# {
|
|
578
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
579
|
+
# expires_in: 1579729529,
|
|
580
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
581
|
+
# token_type: "Bearer",
|
|
582
|
+
# }
|
|
583
|
+
#
|
|
435
584
|
# @example Request syntax with placeholder values
|
|
436
585
|
#
|
|
437
586
|
# resp = client.create_token({
|
|
@@ -443,6 +592,7 @@ module Aws::SSOOIDC
|
|
|
443
592
|
# refresh_token: "RefreshToken",
|
|
444
593
|
# scope: ["Scope"],
|
|
445
594
|
# redirect_uri: "URI",
|
|
595
|
+
# code_verifier: "CodeVerifier",
|
|
446
596
|
# })
|
|
447
597
|
#
|
|
448
598
|
# @example Response structure
|
|
@@ -462,9 +612,270 @@ module Aws::SSOOIDC
|
|
|
462
612
|
req.send_request(options)
|
|
463
613
|
end
|
|
464
614
|
|
|
465
|
-
#
|
|
466
|
-
#
|
|
467
|
-
#
|
|
615
|
+
# Creates and returns access and refresh tokens for authorized client
|
|
616
|
+
# applications that are authenticated using any IAM entity, such as a
|
|
617
|
+
# service role or user. These tokens might contain defined scopes that
|
|
618
|
+
# specify permissions such as `read:profile` or `write:data`. Through
|
|
619
|
+
# downscoping, you can use the scopes parameter to request tokens with
|
|
620
|
+
# reduced permissions compared to the original client application's
|
|
621
|
+
# permissions or, if applicable, the refresh token's scopes. The access
|
|
622
|
+
# token can be used to fetch short-lived credentials for the assigned
|
|
623
|
+
# Amazon Web Services accounts or to access application APIs using
|
|
624
|
+
# `bearer` authentication.
|
|
625
|
+
#
|
|
626
|
+
# <note markdown="1"> This API is used with Signature Version 4. For more information, see
|
|
627
|
+
# [Amazon Web Services Signature Version 4 for API Requests][1].
|
|
628
|
+
#
|
|
629
|
+
# </note>
|
|
630
|
+
#
|
|
631
|
+
#
|
|
632
|
+
#
|
|
633
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html
|
|
634
|
+
#
|
|
635
|
+
# @option params [required, String] :client_id
|
|
636
|
+
# The unique identifier string for the client or application. This value
|
|
637
|
+
# is an application ARN that has OAuth grants configured.
|
|
638
|
+
#
|
|
639
|
+
# @option params [required, String] :grant_type
|
|
640
|
+
# Supports the following OAuth grant types: Authorization Code, Refresh
|
|
641
|
+
# Token, JWT Bearer, and Token Exchange. Specify one of the following
|
|
642
|
+
# values, depending on the grant type that you want:
|
|
643
|
+
#
|
|
644
|
+
# * Authorization Code - `authorization_code`
|
|
645
|
+
#
|
|
646
|
+
# * Refresh Token - `refresh_token`
|
|
647
|
+
#
|
|
648
|
+
# * JWT Bearer - `urn:ietf:params:oauth:grant-type:jwt-bearer`
|
|
649
|
+
#
|
|
650
|
+
# * Token Exchange - `urn:ietf:params:oauth:grant-type:token-exchange`
|
|
651
|
+
#
|
|
652
|
+
# @option params [String] :code
|
|
653
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
654
|
+
# This short-lived code is used to identify this authorization request.
|
|
655
|
+
# The code is obtained through a redirect from IAM Identity Center to a
|
|
656
|
+
# redirect URI persisted in the Authorization Code GrantOptions for the
|
|
657
|
+
# application.
|
|
658
|
+
#
|
|
659
|
+
# @option params [String] :refresh_token
|
|
660
|
+
# Used only when calling this API for the Refresh Token grant type. This
|
|
661
|
+
# token is used to refresh short-lived tokens, such as the access token,
|
|
662
|
+
# that might expire.
|
|
663
|
+
#
|
|
664
|
+
# For more information about the features and limitations of the current
|
|
665
|
+
# IAM Identity Center OIDC implementation, see *Considerations for Using
|
|
666
|
+
# this Guide* in the [IAM Identity Center OIDC API Reference][1].
|
|
667
|
+
#
|
|
668
|
+
#
|
|
669
|
+
#
|
|
670
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
|
|
671
|
+
#
|
|
672
|
+
# @option params [String] :assertion
|
|
673
|
+
# Used only when calling this API for the JWT Bearer grant type. This
|
|
674
|
+
# value specifies the JSON Web Token (JWT) issued by a trusted token
|
|
675
|
+
# issuer. To authorize a trusted token issuer, configure the JWT Bearer
|
|
676
|
+
# GrantOptions for the application.
|
|
677
|
+
#
|
|
678
|
+
# @option params [Array<String>] :scope
|
|
679
|
+
# The list of scopes for which authorization is requested. The access
|
|
680
|
+
# token that is issued is limited to the scopes that are granted. If the
|
|
681
|
+
# value is not specified, IAM Identity Center authorizes all scopes
|
|
682
|
+
# configured for the application, including the following default
|
|
683
|
+
# scopes: `openid`, `aws`, `sts:identity_context`.
|
|
684
|
+
#
|
|
685
|
+
# @option params [String] :redirect_uri
|
|
686
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
687
|
+
# This value specifies the location of the client or application that
|
|
688
|
+
# has registered to receive the authorization code.
|
|
689
|
+
#
|
|
690
|
+
# @option params [String] :subject_token
|
|
691
|
+
# Used only when calling this API for the Token Exchange grant type.
|
|
692
|
+
# This value specifies the subject of the exchange. The value of the
|
|
693
|
+
# subject token must be an access token issued by IAM Identity Center to
|
|
694
|
+
# a different client or application. The access token must have
|
|
695
|
+
# authorized scopes that indicate the requested application as a target
|
|
696
|
+
# audience.
|
|
697
|
+
#
|
|
698
|
+
# @option params [String] :subject_token_type
|
|
699
|
+
# Used only when calling this API for the Token Exchange grant type.
|
|
700
|
+
# This value specifies the type of token that is passed as the subject
|
|
701
|
+
# of the exchange. The following value is supported:
|
|
702
|
+
#
|
|
703
|
+
# * Access Token - `urn:ietf:params:oauth:token-type:access_token`
|
|
704
|
+
#
|
|
705
|
+
# @option params [String] :requested_token_type
|
|
706
|
+
# Used only when calling this API for the Token Exchange grant type.
|
|
707
|
+
# This value specifies the type of token that the requester can receive.
|
|
708
|
+
# The following values are supported:
|
|
709
|
+
#
|
|
710
|
+
# * Access Token - `urn:ietf:params:oauth:token-type:access_token`
|
|
711
|
+
#
|
|
712
|
+
# * Refresh Token - `urn:ietf:params:oauth:token-type:refresh_token`
|
|
713
|
+
#
|
|
714
|
+
# @option params [String] :code_verifier
|
|
715
|
+
# Used only when calling this API for the Authorization Code grant type.
|
|
716
|
+
# This value is generated by the client and presented to validate the
|
|
717
|
+
# original code challenge value the client passed at authorization time.
|
|
718
|
+
#
|
|
719
|
+
# @return [Types::CreateTokenWithIAMResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
720
|
+
#
|
|
721
|
+
# * {Types::CreateTokenWithIAMResponse#access_token #access_token} => String
|
|
722
|
+
# * {Types::CreateTokenWithIAMResponse#token_type #token_type} => String
|
|
723
|
+
# * {Types::CreateTokenWithIAMResponse#expires_in #expires_in} => Integer
|
|
724
|
+
# * {Types::CreateTokenWithIAMResponse#refresh_token #refresh_token} => String
|
|
725
|
+
# * {Types::CreateTokenWithIAMResponse#id_token #id_token} => String
|
|
726
|
+
# * {Types::CreateTokenWithIAMResponse#issued_token_type #issued_token_type} => String
|
|
727
|
+
# * {Types::CreateTokenWithIAMResponse#scope #scope} => Array<String>
|
|
728
|
+
# * {Types::CreateTokenWithIAMResponse#aws_additional_details #aws_additional_details} => Types::AwsAdditionalDetails
|
|
729
|
+
#
|
|
730
|
+
#
|
|
731
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
|
|
732
|
+
#
|
|
733
|
+
# resp = client.create_token_with_iam({
|
|
734
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
735
|
+
# code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzg0In0EXAMPLEAUTHCODE",
|
|
736
|
+
# grant_type: "authorization_code",
|
|
737
|
+
# redirect_uri: "https://mywebapp.example/redirect",
|
|
738
|
+
# scope: [
|
|
739
|
+
# "openid",
|
|
740
|
+
# "aws",
|
|
741
|
+
# "sts:identity_context",
|
|
742
|
+
# ],
|
|
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
|
+
# aws_additional_details: {
|
|
749
|
+
# identity_context: "EXAMPLEIDENTITYCONTEXT",
|
|
750
|
+
# },
|
|
751
|
+
# expires_in: 1579729529,
|
|
752
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
|
|
753
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
|
754
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
755
|
+
# scope: [
|
|
756
|
+
# "openid",
|
|
757
|
+
# "aws",
|
|
758
|
+
# "sts:identity_context",
|
|
759
|
+
# ],
|
|
760
|
+
# token_type: "Bearer",
|
|
761
|
+
# }
|
|
762
|
+
#
|
|
763
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with IAM authentication
|
|
764
|
+
#
|
|
765
|
+
# resp = client.create_token_with_iam({
|
|
766
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
767
|
+
# grant_type: "refresh_token",
|
|
768
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
769
|
+
# })
|
|
770
|
+
#
|
|
771
|
+
# resp.to_h outputs the following:
|
|
772
|
+
# {
|
|
773
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
774
|
+
# expires_in: 1579729529,
|
|
775
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
|
776
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
777
|
+
# scope: [
|
|
778
|
+
# "openid",
|
|
779
|
+
# "aws",
|
|
780
|
+
# "sts:identity_context",
|
|
781
|
+
# ],
|
|
782
|
+
# token_type: "Bearer",
|
|
783
|
+
# }
|
|
784
|
+
#
|
|
785
|
+
# @example Example: Call OAuth/OIDC /token endpoint for JWT Bearer grant with IAM authentication
|
|
786
|
+
#
|
|
787
|
+
# resp = client.create_token_with_iam({
|
|
788
|
+
# assertion: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjFMVE16YWtpaGlSbGFfOHoyQkVKVlhlV01xbyJ9.eyJ2ZXIiOiIyLjAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vOTEyMjA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkL3YyLjAiLCJzdWIiOiJBQUFBQUFBQUFBQUFBQUFBQUFBQUFJa3pxRlZyU2FTYUZIeTc4MmJidGFRIiwiYXVkIjoiNmNiMDQwMTgtYTNmNS00NmE3LWI5OTUtOTQwYzc4ZjVhZWYzIiwiZXhwIjoxNTM2MzYxNDExLCJpYXQiOjE1MzYyNzQ3MTEsIm5iZiI6MTUzNjI3NDcxMSwibmFtZSI6IkFiZSBMaW5jb2xuIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQWJlTGlAbWljcm9zb2Z0LmNvbSIsIm9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC02NmYzLTMzMzJlY2E3ZWE4MSIsInRpZCI6IjkxMjIwNDBkLTZjNjctNGM1Yi1iMTEyLTM2YTMwNGI2NmRhZCIsIm5vbmNlIjoiMTIzNTIzIiwiYWlvIjoiRGYyVVZYTDFpeCFsTUNXTVNPSkJjRmF0emNHZnZGR2hqS3Y4cTVnMHg3MzJkUjVNQjVCaXN2R1FPN1lXQnlqZDhpUURMcSFlR2JJRGFreXA1bW5PcmNkcUhlWVNubHRlcFFtUnA2QUlaOGpZIn0.1AFWW-Ck5nROwSlltm7GzZvDwUkqvhSQpm55TQsmVo9Y59cLhRXpvB8n-55HCr9Z6G_31_UbeUkoz612I2j_Sm9FFShSDDjoaLQr54CreGIJvjtmS3EkK9a7SJBbcpL1MpUtlfygow39tFjY7EVNW9plWUvRrTgVk7lYLprvfzw-CIqw3gHC-T7IK_m_xkr08INERBtaecwhTeN4chPC4W3jdmw_lIxzC48YoQ0dB1L9-ImX98Egypfrlbm0IBL5spFzL6JDZIRRJOu8vecJvj1mq-IUhGt0MacxX8jdxYLP-KUu2d9MbNKpCKJuZ7p8gwTL5B7NlUdh_dmSviPWrw",
|
|
789
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
790
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
|
791
|
+
# })
|
|
792
|
+
#
|
|
793
|
+
# resp.to_h outputs the following:
|
|
794
|
+
# {
|
|
795
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
796
|
+
# aws_additional_details: {
|
|
797
|
+
# identity_context: "EXAMPLEIDENTITYCONTEXT",
|
|
798
|
+
# },
|
|
799
|
+
# expires_in: 1579729529,
|
|
800
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
|
|
801
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
|
|
802
|
+
# refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
|
|
803
|
+
# scope: [
|
|
804
|
+
# "openid",
|
|
805
|
+
# "aws",
|
|
806
|
+
# "sts:identity_context",
|
|
807
|
+
# ],
|
|
808
|
+
# token_type: "Bearer",
|
|
809
|
+
# }
|
|
810
|
+
#
|
|
811
|
+
# @example Example: Call OAuth/OIDC /token endpoint for Token Exchange grant with IAM authentication
|
|
812
|
+
#
|
|
813
|
+
# resp = client.create_token_with_iam({
|
|
814
|
+
# client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
|
|
815
|
+
# grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
|
|
816
|
+
# requested_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
817
|
+
# subject_token: "aoak-Hig8TUDPNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZDIFFERENTACCESSTOKEN",
|
|
818
|
+
# subject_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
819
|
+
# })
|
|
820
|
+
#
|
|
821
|
+
# resp.to_h outputs the following:
|
|
822
|
+
# {
|
|
823
|
+
# access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
|
|
824
|
+
# aws_additional_details: {
|
|
825
|
+
# identity_context: "EXAMPLEIDENTITYCONTEXT",
|
|
826
|
+
# },
|
|
827
|
+
# expires_in: 1579729529,
|
|
828
|
+
# id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
|
|
829
|
+
# issued_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
830
|
+
# scope: [
|
|
831
|
+
# "openid",
|
|
832
|
+
# "aws",
|
|
833
|
+
# "sts:identity_context",
|
|
834
|
+
# ],
|
|
835
|
+
# token_type: "Bearer",
|
|
836
|
+
# }
|
|
837
|
+
#
|
|
838
|
+
# @example Request syntax with placeholder values
|
|
839
|
+
#
|
|
840
|
+
# resp = client.create_token_with_iam({
|
|
841
|
+
# client_id: "ClientId", # required
|
|
842
|
+
# grant_type: "GrantType", # required
|
|
843
|
+
# code: "AuthCode",
|
|
844
|
+
# refresh_token: "RefreshToken",
|
|
845
|
+
# assertion: "Assertion",
|
|
846
|
+
# scope: ["Scope"],
|
|
847
|
+
# redirect_uri: "URI",
|
|
848
|
+
# subject_token: "SubjectToken",
|
|
849
|
+
# subject_token_type: "TokenTypeURI",
|
|
850
|
+
# requested_token_type: "TokenTypeURI",
|
|
851
|
+
# code_verifier: "CodeVerifier",
|
|
852
|
+
# })
|
|
853
|
+
#
|
|
854
|
+
# @example Response structure
|
|
855
|
+
#
|
|
856
|
+
# resp.access_token #=> String
|
|
857
|
+
# resp.token_type #=> String
|
|
858
|
+
# resp.expires_in #=> Integer
|
|
859
|
+
# resp.refresh_token #=> String
|
|
860
|
+
# resp.id_token #=> String
|
|
861
|
+
# resp.issued_token_type #=> String
|
|
862
|
+
# resp.scope #=> Array
|
|
863
|
+
# resp.scope[0] #=> String
|
|
864
|
+
# resp.aws_additional_details.identity_context #=> String
|
|
865
|
+
#
|
|
866
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM AWS API Documentation
|
|
867
|
+
#
|
|
868
|
+
# @overload create_token_with_iam(params = {})
|
|
869
|
+
# @param [Hash] params ({})
|
|
870
|
+
def create_token_with_iam(params = {}, options = {})
|
|
871
|
+
req = build_request(:create_token_with_iam, params)
|
|
872
|
+
req.send_request(options)
|
|
873
|
+
end
|
|
874
|
+
|
|
875
|
+
# Registers a public client with IAM Identity Center. This allows
|
|
876
|
+
# clients to perform authorization using the authorization
|
|
877
|
+
# code grant with Proof Key for Code Exchange (PKCE) or the device
|
|
878
|
+
# code grant.
|
|
468
879
|
#
|
|
469
880
|
# @option params [required, String] :client_name
|
|
470
881
|
# The friendly name of the client.
|
|
@@ -478,6 +889,35 @@ module Aws::SSOOIDC
|
|
|
478
889
|
# this list is used to restrict permissions when granting an access
|
|
479
890
|
# token.
|
|
480
891
|
#
|
|
892
|
+
# @option params [Array<String>] :redirect_uris
|
|
893
|
+
# The list of redirect URI that are defined by the client. At completion
|
|
894
|
+
# of authorization, this list is used to restrict what locations the
|
|
895
|
+
# user agent can be redirected back to.
|
|
896
|
+
#
|
|
897
|
+
# @option params [Array<String>] :grant_types
|
|
898
|
+
# The list of OAuth 2.0 grant types that are defined by the client. This
|
|
899
|
+
# list is used to restrict the token granting flows available to the
|
|
900
|
+
# client. Supports the following OAuth 2.0 grant types: Authorization
|
|
901
|
+
# Code, Device Code, and Refresh Token.
|
|
902
|
+
#
|
|
903
|
+
# * Authorization Code - `authorization_code`
|
|
904
|
+
#
|
|
905
|
+
# * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
|
|
906
|
+
#
|
|
907
|
+
# * Refresh Token - `refresh_token`
|
|
908
|
+
#
|
|
909
|
+
# @option params [String] :issuer_url
|
|
910
|
+
# The IAM Identity Center Issuer URL associated with an instance of IAM
|
|
911
|
+
# Identity Center. This value is needed for user access to resources
|
|
912
|
+
# through the client.
|
|
913
|
+
#
|
|
914
|
+
# @option params [String] :entitled_application_arn
|
|
915
|
+
# This IAM Identity Center application ARN is used to define
|
|
916
|
+
# administrator-managed configuration for public client access to
|
|
917
|
+
# resources. At authorization, the scopes, grants, and redirect URI
|
|
918
|
+
# available to this client will be restricted by this application
|
|
919
|
+
# resource.
|
|
920
|
+
#
|
|
481
921
|
# @return [Types::RegisterClientResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
482
922
|
#
|
|
483
923
|
# * {Types::RegisterClientResponse#client_id #client_id} => String
|
|
@@ -487,12 +927,45 @@ module Aws::SSOOIDC
|
|
|
487
927
|
# * {Types::RegisterClientResponse#authorization_endpoint #authorization_endpoint} => String
|
|
488
928
|
# * {Types::RegisterClientResponse#token_endpoint #token_endpoint} => String
|
|
489
929
|
#
|
|
930
|
+
#
|
|
931
|
+
# @example Example: Call OAuth/OIDC /register-client endpoint
|
|
932
|
+
#
|
|
933
|
+
# resp = client.register_client({
|
|
934
|
+
# client_name: "My IDE Plugin",
|
|
935
|
+
# client_type: "public",
|
|
936
|
+
# entitled_application_arn: "arn:aws:sso::ACCOUNTID:application/ssoins-1111111111111111/apl-1111111111111111",
|
|
937
|
+
# grant_types: [
|
|
938
|
+
# "authorization_code",
|
|
939
|
+
# "refresh_token",
|
|
940
|
+
# ],
|
|
941
|
+
# issuer_url: "https://identitycenter.amazonaws.com/ssoins-1111111111111111",
|
|
942
|
+
# redirect_uris: [
|
|
943
|
+
# "127.0.0.1:PORT/oauth/callback",
|
|
944
|
+
# ],
|
|
945
|
+
# scopes: [
|
|
946
|
+
# "sso:account:access",
|
|
947
|
+
# "codewhisperer:completions",
|
|
948
|
+
# ],
|
|
949
|
+
# })
|
|
950
|
+
#
|
|
951
|
+
# resp.to_h outputs the following:
|
|
952
|
+
# {
|
|
953
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
954
|
+
# client_id_issued_at: 1579725929,
|
|
955
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
956
|
+
# client_secret_expires_at: 1587584729,
|
|
957
|
+
# }
|
|
958
|
+
#
|
|
490
959
|
# @example Request syntax with placeholder values
|
|
491
960
|
#
|
|
492
961
|
# resp = client.register_client({
|
|
493
962
|
# client_name: "ClientName", # required
|
|
494
963
|
# client_type: "ClientType", # required
|
|
495
964
|
# scopes: ["Scope"],
|
|
965
|
+
# redirect_uris: ["URI"],
|
|
966
|
+
# grant_types: ["GrantType"],
|
|
967
|
+
# issuer_url: "URI",
|
|
968
|
+
# entitled_application_arn: "ArnType",
|
|
496
969
|
# })
|
|
497
970
|
#
|
|
498
971
|
# @example Response structure
|
|
@@ -526,8 +999,9 @@ module Aws::SSOOIDC
|
|
|
526
999
|
# come from the persisted result of the RegisterClient API operation.
|
|
527
1000
|
#
|
|
528
1001
|
# @option params [required, String] :start_url
|
|
529
|
-
# The URL for the
|
|
530
|
-
# the
|
|
1002
|
+
# The URL for the Amazon Web Services access portal. For more
|
|
1003
|
+
# information, see [Using the Amazon Web Services access portal][1] in
|
|
1004
|
+
# the *IAM Identity Center User Guide*.
|
|
531
1005
|
#
|
|
532
1006
|
#
|
|
533
1007
|
#
|
|
@@ -542,6 +1016,25 @@ module Aws::SSOOIDC
|
|
|
542
1016
|
# * {Types::StartDeviceAuthorizationResponse#expires_in #expires_in} => Integer
|
|
543
1017
|
# * {Types::StartDeviceAuthorizationResponse#interval #interval} => Integer
|
|
544
1018
|
#
|
|
1019
|
+
#
|
|
1020
|
+
# @example Example: Call OAuth/OIDC /start-device-authorization endpoint
|
|
1021
|
+
#
|
|
1022
|
+
# resp = client.start_device_authorization({
|
|
1023
|
+
# client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
|
|
1024
|
+
# client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
|
|
1025
|
+
# start_url: "https://identitycenter.amazonaws.com/ssoins-111111111111",
|
|
1026
|
+
# })
|
|
1027
|
+
#
|
|
1028
|
+
# resp.to_h outputs the following:
|
|
1029
|
+
# {
|
|
1030
|
+
# device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
|
|
1031
|
+
# expires_in: 1579729529,
|
|
1032
|
+
# interval: 1,
|
|
1033
|
+
# user_code: "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
|
|
1034
|
+
# verification_uri: "https://directory-alias-example.awsapps.com/start/#/device",
|
|
1035
|
+
# verification_uri_complete: "https://directory-alias-example.awsapps.com/start/#/device?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
|
|
1036
|
+
# }
|
|
1037
|
+
#
|
|
545
1038
|
# @example Request syntax with placeholder values
|
|
546
1039
|
#
|
|
547
1040
|
# resp = client.start_device_authorization({
|
|
@@ -574,14 +1067,19 @@ module Aws::SSOOIDC
|
|
|
574
1067
|
# @api private
|
|
575
1068
|
def build_request(operation_name, params = {})
|
|
576
1069
|
handlers = @handlers.for(operation_name)
|
|
1070
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
|
1071
|
+
Aws::Telemetry.module_to_tracer_name('Aws::SSOOIDC')
|
|
1072
|
+
)
|
|
577
1073
|
context = Seahorse::Client::RequestContext.new(
|
|
578
1074
|
operation_name: operation_name,
|
|
579
1075
|
operation: config.api.operation(operation_name),
|
|
580
1076
|
client: self,
|
|
581
1077
|
params: params,
|
|
582
|
-
config: config
|
|
1078
|
+
config: config,
|
|
1079
|
+
tracer: tracer
|
|
1080
|
+
)
|
|
583
1081
|
context[:gem_name] = 'aws-sdk-core'
|
|
584
|
-
context[:gem_version] = '3.
|
|
1082
|
+
context[:gem_version] = '3.254.1'
|
|
585
1083
|
Seahorse::Client::Request.new(handlers, context)
|
|
586
1084
|
end
|
|
587
1085
|
|