Skip to content

Commit 950a3c4

Browse files
committed
Cleanup
1 parent 3676c0e commit 950a3c4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

samples/AuthorizationServerExample/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async Task<bool> ValidateToken(string token)
4040
}
4141

4242
// 3. Create an authorization provider with the PRM and token validator
43-
var authProvider = new SimpleServerAuthorizationProvider(prm, ValidateToken);
43+
var authProvider = new BasicServerAuthorizationProvider(prm, ValidateToken);
4444

4545
// 4. Configure the MCP server with authorization
4646
builder.Services.AddMcpServer(options =>

src/ModelContextProtocol/Server/Auth/SimpleServerAuthorizationProvider.cs renamed to src/ModelContextProtocol/Server/Auth/BasicServerAuthorizationProvider.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
namespace ModelContextProtocol.Server.Auth;
44

55
/// <summary>
6-
/// A simple implementation of <see cref="IServerAuthorizationProvider"/> that validates bearer tokens.
6+
/// A basic implementation of <see cref="IServerAuthorizationProvider"/>.
77
/// </summary>
88
/// <remarks>
99
/// This implementation is intended as a starting point for server developers. In production environments,
1010
/// it should be extended or replaced with a more robust implementation that integrates with your
1111
/// authentication system (e.g., OAuth 2.0 server, identity provider, etc.)
1212
/// </remarks>
1313
/// <remarks>
14-
/// Initializes a new instance of the <see cref="SimpleServerAuthorizationProvider"/> class
14+
/// Initializes a new instance of the <see cref="BasicServerAuthorizationProvider"/> class
1515
/// with the specified resource metadata and token validator.
1616
/// </remarks>
1717
/// <param name="resourceMetadata">The protected resource metadata.</param>
1818
/// <param name="tokenValidator">A function that validates access tokens. If not provided, a function that always returns true will be used.</param>
19-
public class SimpleServerAuthorizationProvider(
19+
public class BasicServerAuthorizationProvider(
2020
ProtectedResourceMetadata resourceMetadata,
2121
Func<string, Task<bool>>? tokenValidator = null) : IServerAuthorizationProvider
2222
{

0 commit comments

Comments
 (0)