Module auth

Module auth 

Source
Expand description

Authentication middleware for MockForge HTTP server

This module provides comprehensive authentication middleware that automatically validates requests against configured authentication schemes including:

  • Bearer tokens (including JWT)
  • Basic authentication
  • API keys
  • OAuth2 with token introspection

Re-exports§

pub use admin_auth::check_admin_auth;
pub use authenticator::authenticate_jwt;
pub use authenticator::authenticate_request;
pub use middleware::auth_middleware;
pub use oauth2::create_oauth2_client;
pub use state::AuthState;
pub use types::AuthClaims;
pub use types::AuthResult;

Modules§

admin_auth
Admin UI authentication
authenticator
Authentication methods and logic
middleware
Authentication middleware
oauth2
OAuth2 utilities and client creation
state
Authentication state management
types
Authentication types and data structures

Structs§

ApiKeyConfig
API key configuration
AuthConfig
Authentication configuration for HTTP requests
BasicAuthConfig
Basic authentication configuration
JwtConfig
JWT authentication configuration
OAuth2Config
OAuth2 configuration