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,6 +7,7 @@
|
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
10
|
+
|
|
10
11
|
module Aws::SSOOIDC
|
|
11
12
|
# @api private
|
|
12
13
|
module ClientApi
|
|
@@ -15,30 +16,43 @@ module Aws::SSOOIDC
|
|
|
15
16
|
|
|
16
17
|
AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
|
|
17
18
|
AccessToken = Shapes::StringShape.new(name: 'AccessToken')
|
|
19
|
+
ArnType = Shapes::StringShape.new(name: 'ArnType')
|
|
20
|
+
Assertion = Shapes::StringShape.new(name: 'Assertion')
|
|
18
21
|
AuthCode = Shapes::StringShape.new(name: 'AuthCode')
|
|
19
22
|
AuthorizationPendingException = Shapes::StructureShape.new(name: 'AuthorizationPendingException')
|
|
23
|
+
AwsAdditionalDetails = Shapes::StructureShape.new(name: 'AwsAdditionalDetails')
|
|
20
24
|
ClientId = Shapes::StringShape.new(name: 'ClientId')
|
|
21
25
|
ClientName = Shapes::StringShape.new(name: 'ClientName')
|
|
22
26
|
ClientSecret = Shapes::StringShape.new(name: 'ClientSecret')
|
|
23
27
|
ClientType = Shapes::StringShape.new(name: 'ClientType')
|
|
28
|
+
CodeVerifier = Shapes::StringShape.new(name: 'CodeVerifier')
|
|
24
29
|
CreateTokenRequest = Shapes::StructureShape.new(name: 'CreateTokenRequest')
|
|
25
30
|
CreateTokenResponse = Shapes::StructureShape.new(name: 'CreateTokenResponse')
|
|
31
|
+
CreateTokenWithIAMRequest = Shapes::StructureShape.new(name: 'CreateTokenWithIAMRequest')
|
|
32
|
+
CreateTokenWithIAMResponse = Shapes::StructureShape.new(name: 'CreateTokenWithIAMResponse')
|
|
26
33
|
DeviceCode = Shapes::StringShape.new(name: 'DeviceCode')
|
|
27
34
|
Error = Shapes::StringShape.new(name: 'Error')
|
|
28
35
|
ErrorDescription = Shapes::StringShape.new(name: 'ErrorDescription')
|
|
29
36
|
ExpirationInSeconds = Shapes::IntegerShape.new(name: 'ExpirationInSeconds')
|
|
30
37
|
ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
|
|
31
38
|
GrantType = Shapes::StringShape.new(name: 'GrantType')
|
|
39
|
+
GrantTypes = Shapes::ListShape.new(name: 'GrantTypes')
|
|
32
40
|
IdToken = Shapes::StringShape.new(name: 'IdToken')
|
|
41
|
+
IdentityContext = Shapes::StringShape.new(name: 'IdentityContext')
|
|
33
42
|
InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
|
|
34
43
|
IntervalInSeconds = Shapes::IntegerShape.new(name: 'IntervalInSeconds')
|
|
35
44
|
InvalidClientException = Shapes::StructureShape.new(name: 'InvalidClientException')
|
|
36
45
|
InvalidClientMetadataException = Shapes::StructureShape.new(name: 'InvalidClientMetadataException')
|
|
37
46
|
InvalidGrantException = Shapes::StructureShape.new(name: 'InvalidGrantException')
|
|
47
|
+
InvalidRedirectUriException = Shapes::StructureShape.new(name: 'InvalidRedirectUriException')
|
|
38
48
|
InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
|
|
49
|
+
InvalidRequestRegionException = Shapes::StructureShape.new(name: 'InvalidRequestRegionException')
|
|
39
50
|
InvalidScopeException = Shapes::StructureShape.new(name: 'InvalidScopeException')
|
|
51
|
+
Location = Shapes::StringShape.new(name: 'Location')
|
|
40
52
|
LongTimeStampType = Shapes::IntegerShape.new(name: 'LongTimeStampType')
|
|
53
|
+
RedirectUris = Shapes::ListShape.new(name: 'RedirectUris')
|
|
41
54
|
RefreshToken = Shapes::StringShape.new(name: 'RefreshToken')
|
|
55
|
+
Region = Shapes::StringShape.new(name: 'Region')
|
|
42
56
|
RegisterClientRequest = Shapes::StructureShape.new(name: 'RegisterClientRequest')
|
|
43
57
|
RegisterClientResponse = Shapes::StructureShape.new(name: 'RegisterClientResponse')
|
|
44
58
|
Scope = Shapes::StringShape.new(name: 'Scope')
|
|
@@ -46,7 +60,9 @@ module Aws::SSOOIDC
|
|
|
46
60
|
SlowDownException = Shapes::StructureShape.new(name: 'SlowDownException')
|
|
47
61
|
StartDeviceAuthorizationRequest = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationRequest')
|
|
48
62
|
StartDeviceAuthorizationResponse = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationResponse')
|
|
63
|
+
SubjectToken = Shapes::StringShape.new(name: 'SubjectToken')
|
|
49
64
|
TokenType = Shapes::StringShape.new(name: 'TokenType')
|
|
65
|
+
TokenTypeURI = Shapes::StringShape.new(name: 'TokenTypeURI')
|
|
50
66
|
URI = Shapes::StringShape.new(name: 'URI')
|
|
51
67
|
UnauthorizedClientException = Shapes::StructureShape.new(name: 'UnauthorizedClientException')
|
|
52
68
|
UnsupportedGrantTypeException = Shapes::StructureShape.new(name: 'UnsupportedGrantTypeException')
|
|
@@ -60,6 +76,9 @@ module Aws::SSOOIDC
|
|
|
60
76
|
AuthorizationPendingException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
|
61
77
|
AuthorizationPendingException.struct_class = Types::AuthorizationPendingException
|
|
62
78
|
|
|
79
|
+
AwsAdditionalDetails.add_member(:identity_context, Shapes::ShapeRef.new(shape: IdentityContext, location_name: "identityContext"))
|
|
80
|
+
AwsAdditionalDetails.struct_class = Types::AwsAdditionalDetails
|
|
81
|
+
|
|
63
82
|
CreateTokenRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
|
|
64
83
|
CreateTokenRequest.add_member(:client_secret, Shapes::ShapeRef.new(shape: ClientSecret, required: true, location_name: "clientSecret"))
|
|
65
84
|
CreateTokenRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: GrantType, required: true, location_name: "grantType"))
|
|
@@ -68,6 +87,7 @@ module Aws::SSOOIDC
|
|
|
68
87
|
CreateTokenRequest.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
|
|
69
88
|
CreateTokenRequest.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
|
|
70
89
|
CreateTokenRequest.add_member(:redirect_uri, Shapes::ShapeRef.new(shape: URI, location_name: "redirectUri"))
|
|
90
|
+
CreateTokenRequest.add_member(:code_verifier, Shapes::ShapeRef.new(shape: CodeVerifier, location_name: "codeVerifier"))
|
|
71
91
|
CreateTokenRequest.struct_class = Types::CreateTokenRequest
|
|
72
92
|
|
|
73
93
|
CreateTokenResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessToken, location_name: "accessToken"))
|
|
@@ -77,10 +97,35 @@ module Aws::SSOOIDC
|
|
|
77
97
|
CreateTokenResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
|
|
78
98
|
CreateTokenResponse.struct_class = Types::CreateTokenResponse
|
|
79
99
|
|
|
100
|
+
CreateTokenWithIAMRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
|
|
101
|
+
CreateTokenWithIAMRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: GrantType, required: true, location_name: "grantType"))
|
|
102
|
+
CreateTokenWithIAMRequest.add_member(:code, Shapes::ShapeRef.new(shape: AuthCode, location_name: "code"))
|
|
103
|
+
CreateTokenWithIAMRequest.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
|
|
104
|
+
CreateTokenWithIAMRequest.add_member(:assertion, Shapes::ShapeRef.new(shape: Assertion, location_name: "assertion"))
|
|
105
|
+
CreateTokenWithIAMRequest.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
|
|
106
|
+
CreateTokenWithIAMRequest.add_member(:redirect_uri, Shapes::ShapeRef.new(shape: URI, location_name: "redirectUri"))
|
|
107
|
+
CreateTokenWithIAMRequest.add_member(:subject_token, Shapes::ShapeRef.new(shape: SubjectToken, location_name: "subjectToken"))
|
|
108
|
+
CreateTokenWithIAMRequest.add_member(:subject_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "subjectTokenType"))
|
|
109
|
+
CreateTokenWithIAMRequest.add_member(:requested_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "requestedTokenType"))
|
|
110
|
+
CreateTokenWithIAMRequest.add_member(:code_verifier, Shapes::ShapeRef.new(shape: CodeVerifier, location_name: "codeVerifier"))
|
|
111
|
+
CreateTokenWithIAMRequest.struct_class = Types::CreateTokenWithIAMRequest
|
|
112
|
+
|
|
113
|
+
CreateTokenWithIAMResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessToken, location_name: "accessToken"))
|
|
114
|
+
CreateTokenWithIAMResponse.add_member(:token_type, Shapes::ShapeRef.new(shape: TokenType, location_name: "tokenType"))
|
|
115
|
+
CreateTokenWithIAMResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: ExpirationInSeconds, location_name: "expiresIn"))
|
|
116
|
+
CreateTokenWithIAMResponse.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
|
|
117
|
+
CreateTokenWithIAMResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
|
|
118
|
+
CreateTokenWithIAMResponse.add_member(:issued_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "issuedTokenType"))
|
|
119
|
+
CreateTokenWithIAMResponse.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
|
|
120
|
+
CreateTokenWithIAMResponse.add_member(:aws_additional_details, Shapes::ShapeRef.new(shape: AwsAdditionalDetails, location_name: "awsAdditionalDetails"))
|
|
121
|
+
CreateTokenWithIAMResponse.struct_class = Types::CreateTokenWithIAMResponse
|
|
122
|
+
|
|
80
123
|
ExpiredTokenException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
|
|
81
124
|
ExpiredTokenException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
|
82
125
|
ExpiredTokenException.struct_class = Types::ExpiredTokenException
|
|
83
126
|
|
|
127
|
+
GrantTypes.member = Shapes::ShapeRef.new(shape: GrantType)
|
|
128
|
+
|
|
84
129
|
InternalServerException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
|
|
85
130
|
InternalServerException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
|
86
131
|
InternalServerException.struct_class = Types::InternalServerException
|
|
@@ -97,17 +142,33 @@ module Aws::SSOOIDC
|
|
|
97
142
|
InvalidGrantException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
|
98
143
|
InvalidGrantException.struct_class = Types::InvalidGrantException
|
|
99
144
|
|
|
145
|
+
InvalidRedirectUriException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
|
|
146
|
+
InvalidRedirectUriException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
|
147
|
+
InvalidRedirectUriException.struct_class = Types::InvalidRedirectUriException
|
|
148
|
+
|
|
100
149
|
InvalidRequestException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
|
|
101
150
|
InvalidRequestException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
|
102
151
|
InvalidRequestException.struct_class = Types::InvalidRequestException
|
|
103
152
|
|
|
153
|
+
InvalidRequestRegionException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
|
|
154
|
+
InvalidRequestRegionException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
|
155
|
+
InvalidRequestRegionException.add_member(:endpoint, Shapes::ShapeRef.new(shape: Location, location_name: "endpoint"))
|
|
156
|
+
InvalidRequestRegionException.add_member(:region, Shapes::ShapeRef.new(shape: Region, location_name: "region"))
|
|
157
|
+
InvalidRequestRegionException.struct_class = Types::InvalidRequestRegionException
|
|
158
|
+
|
|
104
159
|
InvalidScopeException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
|
|
105
160
|
InvalidScopeException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
|
|
106
161
|
InvalidScopeException.struct_class = Types::InvalidScopeException
|
|
107
162
|
|
|
163
|
+
RedirectUris.member = Shapes::ShapeRef.new(shape: URI)
|
|
164
|
+
|
|
108
165
|
RegisterClientRequest.add_member(:client_name, Shapes::ShapeRef.new(shape: ClientName, required: true, location_name: "clientName"))
|
|
109
166
|
RegisterClientRequest.add_member(:client_type, Shapes::ShapeRef.new(shape: ClientType, required: true, location_name: "clientType"))
|
|
110
167
|
RegisterClientRequest.add_member(:scopes, Shapes::ShapeRef.new(shape: Scopes, location_name: "scopes"))
|
|
168
|
+
RegisterClientRequest.add_member(:redirect_uris, Shapes::ShapeRef.new(shape: RedirectUris, location_name: "redirectUris"))
|
|
169
|
+
RegisterClientRequest.add_member(:grant_types, Shapes::ShapeRef.new(shape: GrantTypes, location_name: "grantTypes"))
|
|
170
|
+
RegisterClientRequest.add_member(:issuer_url, Shapes::ShapeRef.new(shape: URI, location_name: "issuerUrl"))
|
|
171
|
+
RegisterClientRequest.add_member(:entitled_application_arn, Shapes::ShapeRef.new(shape: ArnType, location_name: "entitledApplicationArn"))
|
|
111
172
|
RegisterClientRequest.struct_class = Types::RegisterClientRequest
|
|
112
173
|
|
|
113
174
|
RegisterClientResponse.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, location_name: "clientId"))
|
|
@@ -153,14 +214,16 @@ module Aws::SSOOIDC
|
|
|
153
214
|
|
|
154
215
|
api.metadata = {
|
|
155
216
|
"apiVersion" => "2019-06-10",
|
|
217
|
+
"auth" => ["aws.auth#sigv4"],
|
|
156
218
|
"endpointPrefix" => "oidc",
|
|
157
219
|
"jsonVersion" => "1.1",
|
|
158
220
|
"protocol" => "rest-json",
|
|
221
|
+
"protocols" => ["rest-json"],
|
|
159
222
|
"serviceAbbreviation" => "SSO OIDC",
|
|
160
223
|
"serviceFullName" => "AWS SSO OIDC",
|
|
161
224
|
"serviceId" => "SSO OIDC",
|
|
162
225
|
"signatureVersion" => "v4",
|
|
163
|
-
"signingName" => "
|
|
226
|
+
"signingName" => "sso-oauth",
|
|
164
227
|
"uid" => "sso-oidc-2019-06-10",
|
|
165
228
|
}
|
|
166
229
|
|
|
@@ -169,6 +232,7 @@ module Aws::SSOOIDC
|
|
|
169
232
|
o.http_method = "POST"
|
|
170
233
|
o.http_request_uri = "/token"
|
|
171
234
|
o['authtype'] = "none"
|
|
235
|
+
o['auth'] = ["smithy.api#noAuth"]
|
|
172
236
|
o.input = Shapes::ShapeRef.new(shape: CreateTokenRequest)
|
|
173
237
|
o.output = Shapes::ShapeRef.new(shape: CreateTokenResponse)
|
|
174
238
|
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
|
@@ -184,17 +248,40 @@ module Aws::SSOOIDC
|
|
|
184
248
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
|
185
249
|
end)
|
|
186
250
|
|
|
251
|
+
api.add_operation(:create_token_with_iam, Seahorse::Model::Operation.new.tap do |o|
|
|
252
|
+
o.name = "CreateTokenWithIAM"
|
|
253
|
+
o.http_method = "POST"
|
|
254
|
+
o.http_request_uri = "/token?aws_iam=t"
|
|
255
|
+
o.input = Shapes::ShapeRef.new(shape: CreateTokenWithIAMRequest)
|
|
256
|
+
o.output = Shapes::ShapeRef.new(shape: CreateTokenWithIAMResponse)
|
|
257
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
|
258
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidClientException)
|
|
259
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidGrantException)
|
|
260
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedClientException)
|
|
261
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedGrantTypeException)
|
|
262
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
|
|
263
|
+
o.errors << Shapes::ShapeRef.new(shape: AuthorizationPendingException)
|
|
264
|
+
o.errors << Shapes::ShapeRef.new(shape: SlowDownException)
|
|
265
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
|
266
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
|
|
267
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
|
268
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestRegionException)
|
|
269
|
+
end)
|
|
270
|
+
|
|
187
271
|
api.add_operation(:register_client, Seahorse::Model::Operation.new.tap do |o|
|
|
188
272
|
o.name = "RegisterClient"
|
|
189
273
|
o.http_method = "POST"
|
|
190
274
|
o.http_request_uri = "/client/register"
|
|
191
275
|
o['authtype'] = "none"
|
|
276
|
+
o['auth'] = ["smithy.api#noAuth"]
|
|
192
277
|
o.input = Shapes::ShapeRef.new(shape: RegisterClientRequest)
|
|
193
278
|
o.output = Shapes::ShapeRef.new(shape: RegisterClientResponse)
|
|
194
279
|
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
|
195
280
|
o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
|
|
196
281
|
o.errors << Shapes::ShapeRef.new(shape: InvalidClientMetadataException)
|
|
197
282
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
|
283
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRedirectUriException)
|
|
284
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedGrantTypeException)
|
|
198
285
|
end)
|
|
199
286
|
|
|
200
287
|
api.add_operation(:start_device_authorization, Seahorse::Model::Operation.new.tap do |o|
|
|
@@ -202,6 +289,7 @@ module Aws::SSOOIDC
|
|
|
202
289
|
o.http_method = "POST"
|
|
203
290
|
o.http_request_uri = "/device_authorization"
|
|
204
291
|
o['authtype'] = "none"
|
|
292
|
+
o['auth'] = ["smithy.api#noAuth"]
|
|
205
293
|
o.input = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationRequest)
|
|
206
294
|
o.output = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationResponse)
|
|
207
295
|
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
|
@@ -52,15 +52,18 @@ module Aws::SSOOIDC
|
|
|
52
52
|
self[:region] = options[:region]
|
|
53
53
|
self[:use_dual_stack] = options[:use_dual_stack]
|
|
54
54
|
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
|
55
|
-
if self[:use_dual_stack].nil?
|
|
56
|
-
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
|
57
|
-
end
|
|
58
55
|
self[:use_fips] = options[:use_fips]
|
|
59
56
|
self[:use_fips] = false if self[:use_fips].nil?
|
|
60
|
-
if self[:use_fips].nil?
|
|
61
|
-
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
|
62
|
-
end
|
|
63
57
|
self[:endpoint] = options[:endpoint]
|
|
64
58
|
end
|
|
59
|
+
|
|
60
|
+
def self.create(config, options={})
|
|
61
|
+
new({
|
|
62
|
+
region: config.region,
|
|
63
|
+
use_dual_stack: config.use_dualstack_endpoint,
|
|
64
|
+
use_fips: config.use_fips_endpoint,
|
|
65
|
+
endpoint: (config.endpoint.to_s unless config.regional_endpoint),
|
|
66
|
+
}.merge(options))
|
|
67
|
+
end
|
|
65
68
|
end
|
|
66
69
|
end
|
|
@@ -9,103 +9,45 @@
|
|
|
9
9
|
|
|
10
10
|
module Aws::SSOOIDC
|
|
11
11
|
class EndpointProvider
|
|
12
|
-
def
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
)
|
|
12
|
+
def resolve_endpoint(parameters)
|
|
13
|
+
if Aws::Endpoints::Matchers.set?(parameters.endpoint)
|
|
14
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
|
15
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
|
16
|
+
end
|
|
17
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
18
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
|
19
|
+
end
|
|
20
|
+
return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
|
|
21
21
|
end
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
if Aws::Endpoints::Matchers.set?(parameters.region)
|
|
23
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
|
|
24
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
25
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
|
26
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
|
27
|
+
end
|
|
28
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
|
29
|
+
end
|
|
30
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
|
31
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
|
32
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
|
|
33
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.amazonaws.com", headers: {}, properties: {})
|
|
34
|
+
end
|
|
35
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
|
36
|
+
end
|
|
37
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
|
38
|
+
end
|
|
39
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
40
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
|
41
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
|
42
|
+
end
|
|
43
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
|
44
|
+
end
|
|
45
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
|
49
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
|
24
50
|
|
|
25
|
-
def resolve_endpoint(parameters)
|
|
26
|
-
@provider.resolve_endpoint(parameters)
|
|
27
51
|
end
|
|
28
|
-
|
|
29
|
-
# @api private
|
|
30
|
-
RULES = <<-JSON
|
|
31
|
-
eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
|
|
32
|
-
bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOmZhbHNlLCJkb2N1bWVu
|
|
33
|
-
dGF0aW9uIjoiVGhlIEFXUyByZWdpb24gdXNlZC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53
|
end
|
|
@@ -9,49 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
module Aws::SSOOIDC
|
|
12
|
+
# @api private
|
|
12
13
|
module Endpoints
|
|
13
14
|
|
|
14
|
-
class CreateToken
|
|
15
|
-
def self.build(context)
|
|
16
|
-
unless context.config.regional_endpoint
|
|
17
|
-
endpoint = context.config.endpoint.to_s
|
|
18
|
-
end
|
|
19
|
-
Aws::SSOOIDC::EndpointParameters.new(
|
|
20
|
-
region: context.config.region,
|
|
21
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
|
22
|
-
use_fips: context.config.use_fips_endpoint,
|
|
23
|
-
endpoint: endpoint,
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
class RegisterClient
|
|
29
|
-
def self.build(context)
|
|
30
|
-
unless context.config.regional_endpoint
|
|
31
|
-
endpoint = context.config.endpoint.to_s
|
|
32
|
-
end
|
|
33
|
-
Aws::SSOOIDC::EndpointParameters.new(
|
|
34
|
-
region: context.config.region,
|
|
35
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
|
36
|
-
use_fips: context.config.use_fips_endpoint,
|
|
37
|
-
endpoint: endpoint,
|
|
38
|
-
)
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
15
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
unless context.config.regional_endpoint
|
|
45
|
-
endpoint = context.config.endpoint.to_s
|
|
46
|
-
end
|
|
47
|
-
Aws::SSOOIDC::EndpointParameters.new(
|
|
48
|
-
region: context.config.region,
|
|
49
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
|
50
|
-
use_fips: context.config.use_fips_endpoint,
|
|
51
|
-
endpoint: endpoint,
|
|
52
|
-
)
|
|
53
|
-
end
|
|
16
|
+
def self.parameters_for_operation(context)
|
|
17
|
+
Aws::SSOOIDC::EndpointParameters.create(context.config)
|
|
54
18
|
end
|
|
55
|
-
|
|
56
19
|
end
|
|
57
20
|
end
|
|
@@ -34,7 +34,9 @@ module Aws::SSOOIDC
|
|
|
34
34
|
# * {InvalidClientException}
|
|
35
35
|
# * {InvalidClientMetadataException}
|
|
36
36
|
# * {InvalidGrantException}
|
|
37
|
+
# * {InvalidRedirectUriException}
|
|
37
38
|
# * {InvalidRequestException}
|
|
39
|
+
# * {InvalidRequestRegionException}
|
|
38
40
|
# * {InvalidScopeException}
|
|
39
41
|
# * {SlowDownException}
|
|
40
42
|
# * {UnauthorizedClientException}
|
|
@@ -186,6 +188,26 @@ module Aws::SSOOIDC
|
|
|
186
188
|
end
|
|
187
189
|
end
|
|
188
190
|
|
|
191
|
+
class InvalidRedirectUriException < ServiceError
|
|
192
|
+
|
|
193
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
194
|
+
# @param [String] message
|
|
195
|
+
# @param [Aws::SSOOIDC::Types::InvalidRedirectUriException] data
|
|
196
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
197
|
+
super(context, message, data)
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# @return [String]
|
|
201
|
+
def error
|
|
202
|
+
@data[:error]
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# @return [String]
|
|
206
|
+
def error_description
|
|
207
|
+
@data[:error_description]
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
189
211
|
class InvalidRequestException < ServiceError
|
|
190
212
|
|
|
191
213
|
# @param [Seahorse::Client::RequestContext] context
|
|
@@ -206,6 +228,36 @@ module Aws::SSOOIDC
|
|
|
206
228
|
end
|
|
207
229
|
end
|
|
208
230
|
|
|
231
|
+
class InvalidRequestRegionException < ServiceError
|
|
232
|
+
|
|
233
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
234
|
+
# @param [String] message
|
|
235
|
+
# @param [Aws::SSOOIDC::Types::InvalidRequestRegionException] data
|
|
236
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
237
|
+
super(context, message, data)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# @return [String]
|
|
241
|
+
def error
|
|
242
|
+
@data[:error]
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# @return [String]
|
|
246
|
+
def error_description
|
|
247
|
+
@data[:error_description]
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# @return [String]
|
|
251
|
+
def endpoint
|
|
252
|
+
@data[:endpoint]
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# @return [String]
|
|
256
|
+
def region
|
|
257
|
+
@data[:region]
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
209
261
|
class InvalidScopeException < ServiceError
|
|
210
262
|
|
|
211
263
|
# @param [Seahorse::Client::RequestContext] context
|
|
@@ -14,35 +14,49 @@ module Aws::SSOOIDC
|
|
|
14
14
|
option(
|
|
15
15
|
:endpoint_provider,
|
|
16
16
|
doc_type: 'Aws::SSOOIDC::EndpointProvider',
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
rbs_type: 'untyped',
|
|
18
|
+
docstring: <<~DOCS) do |_cfg|
|
|
19
|
+
The endpoint provider used to resolve endpoints. Any object that responds to
|
|
20
|
+
`#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
|
21
|
+
`Aws::SSOOIDC::EndpointParameters`.
|
|
22
|
+
DOCS
|
|
22
23
|
Aws::SSOOIDC::EndpointProvider.new
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
# @api private
|
|
26
27
|
class Handler < Seahorse::Client::Handler
|
|
27
28
|
def call(context)
|
|
28
|
-
# If endpoint was discovered, do not resolve or apply the endpoint.
|
|
29
29
|
unless context[:discovered_endpoint]
|
|
30
|
-
params = parameters_for_operation(context)
|
|
30
|
+
params = Aws::SSOOIDC::Endpoints.parameters_for_operation(context)
|
|
31
31
|
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
|
32
32
|
|
|
33
33
|
context.http_request.endpoint = endpoint.url
|
|
34
34
|
apply_endpoint_headers(context, endpoint.headers)
|
|
35
|
+
|
|
36
|
+
context[:endpoint_params] = params
|
|
37
|
+
context[:endpoint_properties] = endpoint.properties
|
|
35
38
|
end
|
|
36
39
|
|
|
37
|
-
context[:endpoint_params] = params
|
|
38
40
|
context[:auth_scheme] =
|
|
39
41
|
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
|
40
42
|
|
|
41
|
-
@handler.call(context)
|
|
43
|
+
with_metrics(context) { @handler.call(context) }
|
|
42
44
|
end
|
|
43
45
|
|
|
44
46
|
private
|
|
45
47
|
|
|
48
|
+
def with_metrics(context, &block)
|
|
49
|
+
metrics = []
|
|
50
|
+
metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
|
|
51
|
+
if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
|
|
52
|
+
metrics << 'SIGV4A_SIGNING'
|
|
53
|
+
end
|
|
54
|
+
if context.config.credentials&.credentials&.account_id
|
|
55
|
+
metrics << 'RESOLVED_ACCOUNT_ID'
|
|
56
|
+
end
|
|
57
|
+
Aws::Plugins::UserAgent.metric(*metrics, &block)
|
|
58
|
+
end
|
|
59
|
+
|
|
46
60
|
def apply_endpoint_headers(context, headers)
|
|
47
61
|
headers.each do |key, values|
|
|
48
62
|
value = values
|
|
@@ -53,17 +67,6 @@ module Aws::SSOOIDC
|
|
|
53
67
|
context.http_request.headers[key] = value
|
|
54
68
|
end
|
|
55
69
|
end
|
|
56
|
-
|
|
57
|
-
def parameters_for_operation(context)
|
|
58
|
-
case context.operation_name
|
|
59
|
-
when :create_token
|
|
60
|
-
Aws::SSOOIDC::Endpoints::CreateToken.build(context)
|
|
61
|
-
when :register_client
|
|
62
|
-
Aws::SSOOIDC::Endpoints::RegisterClient.build(context)
|
|
63
|
-
when :start_device_authorization
|
|
64
|
-
Aws::SSOOIDC::Endpoints::StartDeviceAuthorization.build(context)
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
70
|
end
|
|
68
71
|
|
|
69
72
|
def add_handlers(handlers, _config)
|