@@ -20,7 +20,7 @@ public AuthorizationDelegatingHandler(IMcpCredentialProvider credentialProvider)
2020 Throw . IfNull ( credentialProvider ) ;
2121
2222 _credentialProvider = credentialProvider ;
23-
23+
2424 // Select first supported scheme as the default
2525 _currentScheme = _credentialProvider . SupportedSchemes . FirstOrDefault ( ) ??
2626 throw new ArgumentException ( "Authorization provider must support at least one authentication scheme." , nameof ( credentialProvider ) ) ;
@@ -50,8 +50,8 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
5050 /// Handles a 401 Unauthorized response by attempting to authenticate and retry the request.
5151 /// </summary>
5252 private async Task < HttpResponseMessage > HandleUnauthorizedResponseAsync (
53- HttpRequestMessage originalRequest ,
54- HttpResponseMessage response ,
53+ HttpRequestMessage originalRequest ,
54+ HttpResponseMessage response ,
5555 CancellationToken cancellationToken )
5656 {
5757 // Gather the schemes the server wants us to use from WWW-Authenticate headers
@@ -62,8 +62,8 @@ private async Task<HttpResponseMessage> HandleUnauthorizedResponseAsync(
6262
6363 // First try to find a direct match with the current scheme if it's still valid
6464 string schemeUsed = originalRequest . Headers . Authorization ? . Scheme ?? _currentScheme ?? string . Empty ;
65- if ( ! string . IsNullOrEmpty ( schemeUsed ) &&
66- serverSchemes . Contains ( schemeUsed ) &&
65+ if ( ! string . IsNullOrEmpty ( schemeUsed ) &&
66+ serverSchemes . Contains ( schemeUsed ) &&
6767 _credentialProvider . SupportedSchemes . Contains ( schemeUsed ) )
6868 {
6969 bestSchemeMatch = schemeUsed ;
@@ -157,7 +157,7 @@ private async Task<HttpResponseMessage> HandleUnauthorizedResponseAsync(
157157 // Send the retry request
158158 return await base . SendAsync ( retryRequest , cancellationToken ) . ConfigureAwait ( false ) ;
159159 }
160-
160+
161161 return response ; // Return the original response if we couldn't handle it
162162 }
163163
@@ -167,7 +167,7 @@ private async Task<HttpResponseMessage> HandleUnauthorizedResponseAsync(
167167 private static HashSet < string > ExtractServerSupportedSchemes ( HttpResponseMessage response )
168168 {
169169 var serverSchemes = new HashSet < string > ( StringComparer . OrdinalIgnoreCase ) ;
170-
170+
171171 if ( response . Headers . Contains ( "WWW-Authenticate" ) )
172172 {
173173 foreach ( var authHeader in response . Headers . GetValues ( "WWW-Authenticate" ) )
@@ -178,7 +178,7 @@ private static HashSet<string> ExtractServerSupportedSchemes(HttpResponseMessage
178178 serverSchemes . Add ( scheme ) ;
179179 }
180180 }
181-
181+
182182 return serverSchemes ;
183183 }
184184
0 commit comments