Documentation
¶
Overview ¶
Package auth provides fail-closed authentication middleware wrapping MCP tool, resource, and prompt handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAuthenticationNotValidated = errors.New("TheHive authentication failed: credentials were not validated")
ErrAuthenticationNotValidated is returned when a request reaches a handler without the authentication marker set by the transport context function.
Functions ¶
func AuthenticatedPromptHandlerFunc ¶
func AuthenticatedPromptHandlerFunc(handler func(ctx context.Context, request mcp.GetPromptRequest) (*mcp.GetPromptResult, error)) func(ctx context.Context, request mcp.GetPromptRequest) (*mcp.GetPromptResult, error)
AuthenticatedPromptHandlerFunc wraps a prompt handler with authentication checking
func AuthenticationMiddleware ¶
func AuthenticationMiddleware() server.ToolHandlerMiddleware
AuthenticationMiddleware returns a middleware function that requires a successful authentication marker before allowing tool operations to proceed
func ResourceAuthenticationMiddleware ¶
func ResourceAuthenticationMiddleware() server.ResourceHandlerMiddleware
ResourceAuthenticationMiddleware returns a middleware function that requires a successful authentication marker before allowing resource operations to proceed
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.