OAuthMcpSecurity

class OAuthMcpSecurity(resourceMetadata: ResourceMetadata, extraWwwAuthenticateFields: Pair<String, String>, checkToken: (String) -> Boolean) : McpSecurity

Standard OAuthSecurity implementation for MCP. Based around the OAuth protected resource metadata endpoint. You can pass in specific contents of the ResourceMetadata, or extra fields to be added to the WWW-Authenticate header.

Constructors

Link copied to clipboard
constructor(authorizationServerUri: Uri, mcpPath: String = "/mcp", checkToken: (String) -> Boolean)

Bare bones MCP Security implementation that uses the OAuth protected resource metadata endpoint

constructor(resourceMetadata: ResourceMetadata, vararg extraWwwAuthenticateFields: Pair<String, String>, checkToken: (String) -> Boolean)

Properties

Link copied to clipboard
open override val filter: Filter
Link copied to clipboard
open override val routes: List<RoutingHttpHandler>