@@ -20,7 +20,7 @@ import aws.smithy.kotlin.runtime.http.response.HttpCall
2020import aws.smithy.kotlin.runtime.http.response.HttpResponse
2121import aws.smithy.kotlin.runtime.http.response.complete
2222import aws.smithy.kotlin.runtime.http.response.dumpResponse
23- import aws.smithy.kotlin.runtime.io.*
23+ import aws.smithy.kotlin.runtime.io.Handler
2424import aws.smithy.kotlin.runtime.io.middleware.Middleware
2525import aws.smithy.kotlin.runtime.io.middleware.Phase
2626import aws.smithy.kotlin.runtime.operation.ExecutionContext
@@ -275,10 +275,13 @@ internal class AuthHandler<Input, Output>(
275275 " auth.scheme_id" to authScheme.schemeId.id
276276 }
277277
278+ // properties need to propagate from AuthOption to signer and identity provider
279+ request.context.merge(authOption.attributes)
280+
278281 // resolve identity from the selected auth scheme
279282 val identityProvider = authScheme.identityProvider(authConfig.identityProviderConfig)
280283 val identity = request.context.operationMetrics.resolveIdentityDuration.measureSeconds(schemeAttr) {
281- identityProvider.resolve(authOption.attributes )
284+ identityProvider.resolve(request.context )
282285 }
283286
284287 val resolveEndpointReq = ResolveEndpointRequest (request.context, request.subject.immutableView(), identity)
@@ -296,8 +299,6 @@ internal class AuthHandler<Input, Output>(
296299
297300 interceptors.readBeforeSigning(modified.subject.immutableView())
298301
299- // signing properties need to propagate from AuthOption to signer
300- modified.context.merge(authOption.attributes)
301302 val signingRequest = SignHttpRequest (modified.subject, identity, modified.context)
302303
303304 request.context.operationMetrics.signingDuration.measureSeconds(schemeAttr) {
0 commit comments