Skip to content

Commit c57b85c

Browse files
Update src/ModelContextProtocol/Authentication/AuthorizationDelegatingHandler.cs
Co-authored-by: Stephen Toub <[email protected]>
1 parent c92343c commit c57b85c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/ModelContextProtocol/Authentication/AuthorizationDelegatingHandler.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ public AuthorizationDelegatingHandler(IMcpAuthorizationProvider authorizationPro
2222
_authorizationProvider = authorizationProvider;
2323

2424
// Select first supported scheme as the default
25-
_currentScheme = _authorizationProvider.SupportedSchemes.FirstOrDefault();
26-
if (_currentScheme == null)
27-
{
25+
_currentScheme = _authorizationProvider.SupportedSchemes.FirstOrDefault() ??
2826
throw new ArgumentException("Authorization provider must support at least one authentication scheme.", nameof(authorizationProvider));
29-
}
3027
}
3128

3229
/// <summary>

0 commit comments

Comments
 (0)