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:
parent
6ed728d005
commit
af719fc576
5 changed files with 90 additions and 81 deletions
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue