Skip to content

Commit 253f5d5

Browse files
localdenhalter73
andauthored
Update src/ModelContextProtocol.AspNetCore/Authentication/McpAuthenticationExceptions.cs
Co-authored-by: Stephen Halter <[email protected]>
1 parent e0c507c commit 253f5d5

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/ModelContextProtocol.AspNetCore/Authentication/McpAuthenticationExceptions.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,9 @@ public static AuthenticationBuilder AddMcp(
3939
string displayName,
4040
Action<McpAuthenticationOptions>? configureOptions = null)
4141
{
42-
if (configureOptions != null)
43-
{
44-
if (authenticationScheme == McpAuthenticationDefaults.AuthenticationScheme)
45-
{
46-
builder.Services.Configure(configureOptions);
47-
}
48-
else
49-
{
50-
builder.Services.Configure(authenticationScheme, configureOptions);
51-
}
52-
}
53-
5442
return builder.AddScheme<McpAuthenticationOptions, McpAuthenticationHandler>(
5543
authenticationScheme,
5644
displayName,
57-
options => { }); // No-op to avoid overriding
45+
configureOptions); // No-op to avoid overriding
5846
}
5947
}

0 commit comments

Comments
 (0)