Skip to main content

Module auth

Module auth 

Source
Expand description

Authentication and identity extraction for HTTP and WebSocket connections.

This module provides functions to extract user identity from request headers, tokens, and WebSocket authentication messages.

§Security Note

The current implementation provides a framework for authentication but requires proper implementation of token validation before production use. The validate_* functions are stubs that should be connected to actual authentication services.

Enums§

AuthError
Authentication error types.

Functions§

extract_identity_from_api_key
Extract identity from an API key.
extract_identity_from_auth_header
Extract identity from HTTP Authorization header value.
extract_identity_from_ws_auth
Extract identity from WebSocket authentication message.

Type Aliases§

AuthResult
Result type for authentication operations.