OAuthMcpSecurity

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

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(resourceMetadata: ResourceMetadata, vararg extraWwwAuthenticateFields: Pair<String, String>, checkToken: (String) -> Boolean)
constructor(authorizationServerUri: Uri, mcpUri: Uri, checkToken: (String) -> Boolean)

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

Properties

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