We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5d11f1 commit 8936f13Copy full SHA for 8936f13
1 file changed
src/corelib/Authentication/AuthenticatedMessageHandler.cs
@@ -21,6 +21,9 @@ public AuthenticatedMessageHandler(HttpMessageHandler innerHandler)
21
22
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
23
{
24
+ if(AuthenticationProvider == null)
25
+ return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
26
+
27
string token = await AuthenticationProvider.GetToken(cancellationToken).ConfigureAwait(false);
28
request.Headers.SetAuthToken(token);
29
0 commit comments