Skip to content

Commit 5c51867

Browse files
committed
Autoscheme based creds resolver support
1 parent b9441df commit 5c51867

File tree

7 files changed

+49
-20
lines changed

7 files changed

+49
-20
lines changed

generated/src/aws-cpp-sdk-s3/source/S3Client.cpp

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <aws/core/utils/logging/ErrorMacros.h>
2020
#include <smithy/identity/resolver/built-in/SimpleAwsCredentialIdentityResolver.h>
2121
#include <smithy/identity/resolver/built-in/AwsCredentialsProviderIdentityResolver.h>
22+
#include <smithy/identity/resolver/built-in/DefaultAwsCredentialIdentityResolver.h>
2223
#include <aws/core/utils/event/EventStream.h>
2324
#include <aws/core/platform/Environment.h>
2425

@@ -163,9 +164,9 @@ S3Client::S3Client(const S3::S3ClientConfiguration& clientConfiguration,
163164
endpointProvider ? endpointProvider : Aws::MakeShared<S3EndpointProvider>(ALLOCATION_TAG),
164165
Aws::MakeShared<smithy::SigV4MultiAuthSchemeResolver<>>(ALLOCATION_TAG),
165166
{
166-
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
167+
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<smithy::DefaultAwsCredentialIdentityResolver>(ALLOCATION_TAG), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
167168
{smithy::S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption.schemeId, smithy::S3ExpressSigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
168-
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
169+
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<smithy::DefaultAwsCredentialIdentityResolver>(ALLOCATION_TAG), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
169170
})
170171
{}
171172

@@ -180,9 +181,9 @@ S3Client::S3Client(const AWSCredentials& credentials,
180181
endpointProvider ? endpointProvider : Aws::MakeShared<S3EndpointProvider>(ALLOCATION_TAG),
181182
Aws::MakeShared<smithy::SigV4MultiAuthSchemeResolver<>>(ALLOCATION_TAG),
182183
{
183-
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials) ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
184+
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<smithy::SimpleAwsCredentialIdentityResolver>(ALLOCATION_TAG, credentials ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
184185
{smithy::S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption.schemeId, smithy::S3ExpressSigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials) ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
185-
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials) ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
186+
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<smithy::SimpleAwsCredentialIdentityResolver>(ALLOCATION_TAG, credentials ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
186187
})
187188
{}
188189

@@ -197,9 +198,9 @@ S3Client::S3Client(const std::shared_ptr<AWSCredentialsProvider>& credentialsPro
197198
endpointProvider ? endpointProvider : Aws::MakeShared<S3EndpointProvider>(ALLOCATION_TAG),
198199
Aws::MakeShared<smithy::SigV4MultiAuthSchemeResolver<>>(ALLOCATION_TAG),
199200
{
200-
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
201-
{smithy::S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption.schemeId, smithy::S3ExpressSigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
202-
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
201+
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<smithy::AwsCredentialsProviderIdentityResolver>(ALLOCATION_TAG, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
202+
{smithy::S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption.schemeId, smithy::S3ExpressSigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
203+
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<smithy::AwsCredentialsProviderIdentityResolver>(ALLOCATION_TAG, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
203204
})
204205
{}
205206

@@ -217,9 +218,9 @@ S3Client::S3Client(const Client::ClientConfiguration& clientConfiguration,
217218
Aws::MakeShared<S3EndpointProvider>(ALLOCATION_TAG),
218219
Aws::MakeShared<smithy::SigV4MultiAuthSchemeResolver<>>(ALLOCATION_TAG),
219220
{
220-
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
221+
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<smithy::DefaultAwsCredentialIdentityResolver>(ALLOCATION_TAG), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
221222
{smithy::S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption.schemeId, smithy::S3ExpressSigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
222-
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
223+
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<smithy::DefaultAwsCredentialIdentityResolver>(ALLOCATION_TAG), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
223224
})
224225
{
225226
}
@@ -239,9 +240,9 @@ S3Client::S3Client(
239240
Aws::MakeShared<S3EndpointProvider>(ALLOCATION_TAG),
240241
Aws::MakeShared<smithy::SigV4MultiAuthSchemeResolver<>>(ALLOCATION_TAG),
241242
{
242-
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials) ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
243+
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<smithy::SimpleAwsCredentialIdentityResolver>(ALLOCATION_TAG, credentials ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
243244
{smithy::S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption.schemeId, smithy::S3ExpressSigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials) ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
244-
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials) ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
245+
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<smithy::SimpleAwsCredentialIdentityResolver>(ALLOCATION_TAG, credentials ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
245246
})
246247
{
247248
}
@@ -261,9 +262,9 @@ S3Client::S3Client(
261262
Aws::MakeShared<S3EndpointProvider>(ALLOCATION_TAG),
262263
Aws::MakeShared<smithy::SigV4MultiAuthSchemeResolver<>>(ALLOCATION_TAG),
263264
{
264-
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
265+
{smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared<smithy::AwsCredentialsProviderIdentityResolver>(ALLOCATION_TAG, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
265266
{smithy::S3ExpressSigV4AuthSchemeOption::s3ExpressSigV4AuthSchemeOption.schemeId, smithy::S3ExpressSigV4AuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
266-
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
267+
{smithy::SigV4aAuthSchemeOption::sigV4aAuthSchemeOption.schemeId, smithy::SigV4aAuthScheme{Aws::MakeShared<smithy::AwsCredentialsProviderIdentityResolver>(ALLOCATION_TAG, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
267268
})
268269
{
269270
}

generated/src/aws-cpp-sdk-s3/source/S3ExpressIdentityResolver.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#include <aws/s3/S3ExpressIdentityResolver.h>
99
#include <aws/s3/model/CreateSessionRequest.h>
1010
#include <aws/core/auth/AWSCredentialsProviderChain.h>
11-
#include <smithy/identity/signer/built-in/S3ExpressSigner.h>
12-
#include <smithy/identity/signer/built-in/SignerProperties.h>
1311
#include <utility>
1412
#include <thread>
1513

tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CppClientGenerator.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,11 +816,16 @@ protected String mapAuthSchemes(final String authSchemeName) {
816816

817817
private static final String SchemeMapFormat = "%s.schemeId, %s";
818818
protected List<String> createAuthSchemeMapEntries(final ServiceModel serviceModel) {
819-
return serviceModel.getAuthSchemes().stream()
819+
return getSupportedAuthSchemes(serviceModel).stream()
820820
.map(authScheme -> String.format(SchemeMapFormat, SchemeIdMapping.get(authScheme), AuthSchemeMapping.get(authScheme)))
821821
.collect(Collectors.toList());
822822
}
823823

824+
protected List<String> getSupportedAuthSchemes(final ServiceModel serviceModel) {
825+
return serviceModel.getAuthSchemes().stream()
826+
.collect(Collectors.toList());
827+
}
828+
824829
private void addRequestlessRequestObjectS(final ServiceModel serviceModel) {
825830
serviceModel.getOperations().values().stream()
826831
.filter(operation -> !operation.hasRequest() || operation.getRequest().getShape().getMembers().values().stream().noneMatch(ShapeMember::isRequired))

tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/s3/S3RestXmlCppClientGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ protected List<SdkFileEntry> generateClientSourceFile(final List<ServiceModel> s
488488
context.put("TemplateOverride", templateOverride);
489489
context.put("AuthSchemeResolver", "SigV4MultiAuthSchemeResolver");
490490
context.put("AuthSchemeMapEntries", createAuthSchemeMapEntries(serviceModels.get(i)));
491+
context.put("AuthSchemes", getSupportedAuthSchemes(serviceModels.get(i)));
491492

492493
final String fileName;
493494
if (i == 0) {

tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientSourceInit.vm

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#set($clientConfiguration = ${serviceNamespace} + "::" + ${metadata.classNamePrefix} + "ClientConfiguration")
2+
#set($s3_express_auth = "sigv4-s3express")
23
#if($serviceModel.hasOnlyBearerAuth())
34
##BEARER TOKEN AUTH PROVIDER C-TOR
45
${className}::${className}(const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider,
@@ -51,7 +52,11 @@ ${className}::${className}(const ${clientConfiguration}& clientConfiguration,
5152
{
5253
#foreach($entry in $AuthSchemeMapEntries)
5354
#if($serviceModel.metadata.serviceId == "S3")
55+
#if($AuthSchemes && $AuthSchemes[$foreach.index] == $s3_express_auth)
5456
{${entry}{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
57+
#else
58+
{${entry}{Aws::MakeShared<smithy::DefaultAwsCredentialIdentityResolver>(ALLOCATION_TAG), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
59+
#end
5560
#else
5661
{${entry}{GetServiceName(), clientConfiguration.region}},
5762
#end
@@ -72,7 +77,11 @@ ${className}::${className}(const AWSCredentials& credentials,
7277
{
7378
#foreach($entry in $AuthSchemeMapEntries)
7479
#if($serviceModel.metadata.serviceId == "S3")
80+
#if($AuthSchemes && $AuthSchemes[$foreach.index] == $s3_express_auth)
7581
{${entry}{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials) ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
82+
#else
83+
{${entry}{Aws::MakeShared<smithy::SimpleAwsCredentialIdentityResolver>(ALLOCATION_TAG, credentials ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
84+
#end
7685
#else
7786
{${entry}{Aws::MakeShared<smithy::SimpleAwsCredentialIdentityResolver>(ALLOCATION_TAG, credentials), GetServiceName(), clientConfiguration.region}},
7887
#end
@@ -93,7 +102,11 @@ ${className}::${className}(const std::shared_ptr<AWSCredentialsProvider>& creden
93102
{
94103
#foreach($entry in $AuthSchemeMapEntries)
95104
#if($serviceModel.metadata.serviceId == "S3")
96-
{${entry}{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
105+
#if($AuthSchemes && $AuthSchemes[$foreach.index] == $s3_express_auth)
106+
{${entry}{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
107+
#else
108+
{${entry}{Aws::MakeShared<smithy::AwsCredentialsProviderIdentityResolver>(ALLOCATION_TAG, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), clientConfiguration.payloadSigningPolicy, false}},
109+
#end
97110
#else
98111
{${entry}{ Aws::MakeShared<smithy::AwsCredentialsProviderIdentityResolver>(ALLOCATION_TAG, credentialsProvider), GetServiceName(), clientConfiguration.region}}
99112
#end
@@ -117,7 +130,11 @@ ${className}::${className}(const Client::ClientConfiguration& clientConfiguratio
117130
Aws::MakeShared<smithy::${AuthSchemeResolver}<>>(ALLOCATION_TAG),
118131
{
119132
#foreach($entry in $AuthSchemeMapEntries)
133+
#if($AuthSchemes && $AuthSchemes[$foreach.index] == $s3_express_auth)
120134
{${entry}{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
135+
#else
136+
{${entry}{Aws::MakeShared<smithy::DefaultAwsCredentialIdentityResolver>(ALLOCATION_TAG), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
137+
#end
121138
#end
122139
})
123140
{
@@ -139,7 +156,11 @@ ${className}::${className}(
139156
Aws::MakeShared<smithy::${AuthSchemeResolver}<>>(ALLOCATION_TAG),
140157
{
141158
#foreach($entry in $AuthSchemeMapEntries)
159+
#if($AuthSchemes && $AuthSchemes[$foreach.index] == $s3_express_auth)
142160
{${entry}{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials) ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
161+
#else
162+
{${entry}{Aws::MakeShared<smithy::SimpleAwsCredentialIdentityResolver>(ALLOCATION_TAG, credentials ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
163+
#end
143164
#end
144165
})
145166
{
@@ -161,7 +182,11 @@ ${className}::${className}(
161182
Aws::MakeShared<smithy::${AuthSchemeResolver}<>>(ALLOCATION_TAG),
162183
{
163184
#foreach($entry in $AuthSchemeMapEntries)
185+
#if($AuthSchemes && $AuthSchemes[$foreach.index] == $s3_express_auth)
164186
{${entry}{Aws::MakeShared<DefaultS3ExpressIdentityResolver>(ALLOCATION_TAG, *this, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
187+
#else
188+
{${entry}{Aws::MakeShared<smithy::AwsCredentialsProviderIdentityResolver>(ALLOCATION_TAG, credentialsProvider ), GetServiceName(), Aws::Region::ComputeSignerRegion(clientConfiguration.region), signPayloads, false}},
189+
#end
165190
#end
166191
})
167192
{
@@ -193,7 +218,7 @@ ${className}::${className}(const Client::ClientConfiguration& clientConfiguratio
193218
Aws::MakeShared<smithy::${AuthSchemeResolver}<>>(ALLOCATION_TAG),
194219
{
195220
#foreach($entry in $AuthSchemeMapEntries)
196-
{$entry{Aws::MakeShared<smithy::DefaultAwsCredentialIdentityResolver>(ALLOCATION_TAG), GetServiceName(), clientConfiguration.region}}
221+
{$entry{Aws::MakeShared<smithy::smithy::DefaultAwsCredentialIdentityResolver>(ALLOCATION_TAG), GetServiceName(), clientConfiguration.region}}
197222
#end
198223
})
199224
{}

0 commit comments

Comments
 (0)