"""
Middleware package for ClaudeTools API.

This package provides authentication, authorization, and error handling
middleware for the FastAPI application.
"""

from api.middleware.auth import (
    create_access_token,
    get_current_user,
    get_optional_current_user,
    hash_password,
    require_scopes,
    verify_password,
    verify_token,
)
from api.middleware.error_handler import (
    AuthenticationError,
    AuthorizationError,
    ClaudeToolsException,
    ConflictError,
    DatabaseError,
    NotFoundError,
    ValidationError,
    register_exception_handlers,
)

__all__ = [
    # Authentication functions
    "create_access_token",
    "verify_token",
    "hash_password",
    "verify_password",
    "get_current_user",
    "get_optional_current_user",
    "require_scopes",
    # Exception classes
    "ClaudeToolsException",
    "AuthenticationError",
    "AuthorizationError",
    "NotFoundError",
    "ValidationError",
    "ConflictError",
    "DatabaseError",
    # Exception handler registration
    "register_exception_handlers",
]
