Skip to content

Commit 5c28b62

Browse files
committed
Update Program.cs
1 parent 991b29b commit 5c28b62

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

samples/ProtectedMCPServer/Program.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,6 @@
7676
metadata.ResourceDocumentation = new Uri("https://docs.example.com/api/weather");
7777
});
7878

79-
// // Configure authentication using the built-in authentication system
80-
// builder.Services.AddAuthentication(options =>
81-
// {
82-
// options.DefaultScheme = "Bearer";
83-
// options.DefaultChallengeScheme = "Bearer"; // Ensure challenges use Bearer scheme
84-
// })
85-
// .AddScheme<AuthenticationSchemeOptions, SimpleAuthHandler>("Bearer", options => { });
86-
87-
//// Add authorization policy for MCP
88-
//builder.Services.AddAuthorization(options =>
89-
//{
90-
// options.AddPolicy("McpAuth", policy =>
91-
// {
92-
// policy.RequireAuthenticatedUser();
93-
// policy.RequireClaim("scope", "weather.read");
94-
// });
95-
//});
96-
9779
var app = builder.Build();
9880

9981
app.UseAuthentication();

0 commit comments

Comments
 (0)