Docs edit pass (MCP.AspNetCore and a few other files) (#1034)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
This commit is contained in:
Genevieve Warren 2025-11-26 05:36:33 -08:00 • committed by GitHub
commit af719fc576
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 90 additions and 81 deletions

View file

@ -1,7 +1,7 @@
namespace ModelContextProtocol.AspNetCore.Authentication;
/// <summary>
/// Default values used by MCP authentication.
/// Represents default values used by MCP authentication.
/// </summary>
public static class McpAuthenticationDefaults
{
@ -14,4 +14,4 @@ public static class McpAuthenticationDefaults
/// The default value used for authentication scheme display name.
/// </summary>
public const string DisplayName = "MCP Authentication";
}
}

View file

@ -6,7 +6,7 @@
public class McpAuthenticationEvents
{
/// <summary>
/// Gets or sets the function that is invoked when resource metadata is requested.
/// Gets or sets the function that's invoked when resource metadata is requested.
/// </summary>
/// <remarks>
/// This function is called when a resource metadata request is made to the protected resource metadata endpoint.
@ -14,4 +14,4 @@ public class McpAuthenticationEvents
/// to provide the appropriate metadata for the current request.
/// </remarks>
public Func<ResourceMetadataRequestContext, Task> OnResourceMetadataRequest { get; set; } = context => Task.CompletedTask;
}
}

View file

@ -8,7 +8,7 @@ using System.Text.Encodings.Web;
namespace ModelContextProtocol.AspNetCore.Authentication;
/// <summary>
/// Authentication handler for MCP protocol that adds resource metadata to challenge responses
/// Represents an authentication handler for MCP protocol that adds resource metadata to challenge responses
/// and handles resource metadata endpoint requests.
/// </summary>
public class McpAuthenticationHandler : AuthenticationHandler<McpAuthenticationOptions>, IAuthenticationRequestHandler

View file

@ -4,7 +4,7 @@ using ModelContextProtocol.Authentication;
namespace ModelContextProtocol.AspNetCore.Authentication;
/// <summary>
/// Options for the MCP authentication handler.
/// Represents options for the MCP authentication handler.
/// </summary>
public class McpAuthenticationOptions : AuthenticationSchemeOptions
{
@ -25,16 +25,16 @@ public class McpAuthenticationOptions : AuthenticationSchemeOptions
/// Gets or sets the events used to handle authentication events.
/// </summary>
public new McpAuthenticationEvents Events
{
get => (McpAuthenticationEvents)base.Events!;
{
get => (McpAuthenticationEvents)base.Events!;
set => base.Events = value;
}
/// <summary>
/// The URI to the resource metadata document.
/// Gets or sets the URI to the resource metadata document.
/// </summary>
/// <remarks>
/// This URI will be included in the WWW-Authenticate header when a 401 response is returned.
/// This URI is included in the WWW-Authenticate header when a 401 response is returned.
/// </remarks>
public Uri ResourceMetadataUri { get; set; }
@ -46,4 +46,4 @@ public class McpAuthenticationOptions : AuthenticationSchemeOptions
/// supported scopes, and other information needed for clients to authenticate.
/// </remarks>
public ProtectedResourceMetadata? ResourceMetadata { get; set; }
}
}

View file

@ -5,7 +5,7 @@ using ModelContextProtocol.Authentication;
namespace ModelContextProtocol.AspNetCore.Authentication;
/// <summary>
/// Context for resource metadata request events.
/// Represents the context for resource metadata request events.
/// </summary>
public class ResourceMetadataRequestContext : HandleRequestContext<McpAuthenticationOptions>
{