"""
src.auth public API — user accounts, sessions, API keys, and middleware.
"""
from .accounts import init_db, create_user, authenticate, get_user, list_users, ROLES, ROLE_PERMISSIONS
from .session import create_session, validate_session, destroy_session
from .api_keys import create_api_key, validate_api_key, list_api_keys, revoke_api_key
from .middleware import require_auth, require_role, has_permission, extract_user
from .auth_api import handle_auth_routes

__all__ = [
    # Accounts
    "init_db", "create_user", "authenticate", "get_user", "list_users", "ROLES", "ROLE_PERMISSIONS",
    # Sessions
    "create_session", "validate_session", "destroy_session",
    # API keys
    "create_api_key", "validate_api_key", "list_api_keys", "revoke_api_key",
    # Middleware
    "require_auth", "require_role", "has_permission", "extract_user",
    # API
    "handle_auth_routes",
]
