Remove re-export shim from keycloak_auth.py, update consumer imports
- rbac_api.py: import get_current_user from auth.dependencies directly - keycloak_auth.py: remove re-export of dependencies module symbols - pdf_service.py, file_processor.py: remove misleading compat comments Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -374,13 +374,3 @@ class HybridAuthenticator:
|
||||
if self.keycloak_auth:
|
||||
await self.keycloak_auth.close()
|
||||
|
||||
|
||||
# Re-export factory functions and FastAPI dependencies from dependencies module
|
||||
# for backward compatibility with existing imports
|
||||
from .dependencies import ( # noqa: E402, F401
|
||||
get_keycloak_config_from_env,
|
||||
get_authenticator,
|
||||
get_auth,
|
||||
get_current_user,
|
||||
require_role,
|
||||
)
|
||||
|
||||
@@ -27,7 +27,8 @@ try:
|
||||
from auth import get_current_user, TokenExpiredError, TokenInvalidError
|
||||
except ImportError:
|
||||
# Fallback for standalone testing
|
||||
from auth.keycloak_auth import get_current_user, TokenExpiredError, TokenInvalidError
|
||||
from auth.keycloak_auth import TokenExpiredError, TokenInvalidError
|
||||
from auth.dependencies import get_current_user
|
||||
|
||||
# Configuration from environment - NO DEFAULT SECRETS
|
||||
ENVIRONMENT = os.environ.get("ENVIRONMENT", "development")
|
||||
|
||||
@@ -31,7 +31,6 @@ from .image_processing import ImageProcessor
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Re-export types for backward compatibility
|
||||
__all__ = [
|
||||
"FileType",
|
||||
"ProcessingMode",
|
||||
|
||||
@@ -21,7 +21,6 @@ from jinja2 import Environment, FileSystemLoader, select_autoescape
|
||||
from weasyprint import HTML, CSS
|
||||
from weasyprint.text.fonts import FontConfiguration
|
||||
|
||||
# Re-export models for backward compatibility
|
||||
from .pdf_models import (
|
||||
SchoolInfo,
|
||||
LetterData,
|
||||
|
||||
Reference in New Issue
Block a user