Skip to content

Commit 24a6783

Browse files
fix: Update auth resolver async flow to add user agent details after resolving identity (#3747)
1 parent 19697c2 commit 24a6783

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"core": {
3+
"changeLogMessages": [
4+
"fix: Update auth resolver async flow to add user agent details after resolving identity"
5+
],
6+
"type": "patch",
7+
"updateMinimum": true
8+
}
9+
}

sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/BaseAuthResolverHandler.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ protected async Task PreInvokeAsync(IExecutionContext executionContext)
162162
{
163163
// We can use DefaultAWSCredentials if it was set by the user for these schemes.
164164
executionContext.RequestContext.Identity = clientConfig.DefaultAWSCredentials;
165-
return;
165+
break;
166166
}
167167

168168
if (scheme is BearerAuthScheme && clientConfig.AWSTokenProvider != null)
@@ -178,7 +178,7 @@ protected async Task PreInvokeAsync(IExecutionContext executionContext)
178178
}
179179

180180
executionContext.RequestContext.Identity = resolvedToken.Value;
181-
return;
181+
break;
182182
}
183183

184184
var identityResolver = scheme.GetIdentityResolver(clientConfig.IdentityResolverConfiguration);
@@ -188,7 +188,7 @@ protected async Task PreInvokeAsync(IExecutionContext executionContext)
188188

189189
if (executionContext.RequestContext.Identity != null)
190190
{
191-
return;
191+
break;
192192
}
193193
}
194194
catch (Exception ex)

0 commit comments

Comments
 (0)