Module auth

Module auth 

Source
Expand description

Authentication middleware and token validation

Provides bearer token authentication for MCP endpoints.

Structs§

AuthConfig
Authentication configuration
AuthMiddleware
Authentication middleware
BearerTokenValidator
Bearer token validator using constant-time comparison

Enums§

AuthMode
Authentication mode

Traits§

TokenValidator
Token validator trait

Functions§

generate_prefixed_token
Generate a token with a specific prefix for identification
generate_token
Generate a secure random token