feat(app): add plugin system with auth plugin and static assets
Add new application structure: - app/main.py - application entry point - app/plugins/ - plugin system with auth plugin: - api/ - REST API endpoints and schemas - authorization/ - auth policies, providers, hooks - domain/ - business logic (service, models, jwt, password) - injection/ - route injection and guards - ops/ - operational utilities - runtime/ - runtime configuration - security/ - middleware, CSRF, dependencies - storage/ - user repositories and models - app/static/ - static assets (scalar.js for API docs) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
"""Domain layer for the auth plugin."""
|
||||
|
||||
from app.plugins.auth.domain.config import AuthConfig, load_auth_config_from_env
|
||||
from app.plugins.auth.domain.errors import AuthErrorCode, AuthErrorResponse, TokenError, token_error_to_code
|
||||
from app.plugins.auth.domain.jwt import TokenPayload, create_access_token, decode_token
|
||||
from app.plugins.auth.domain.models import User, UserResponse
|
||||
from app.plugins.auth.domain.password import hash_password, hash_password_async, verify_password, verify_password_async
|
||||
from app.plugins.auth.domain.service import AuthService, AuthServiceError
|
||||
|
||||
__all__ = [
|
||||
"AuthConfig",
|
||||
"AuthErrorCode",
|
||||
"AuthErrorResponse",
|
||||
"AuthService",
|
||||
"AuthServiceError",
|
||||
"TokenError",
|
||||
"TokenPayload",
|
||||
"User",
|
||||
"UserResponse",
|
||||
"create_access_token",
|
||||
"decode_token",
|
||||
"hash_password",
|
||||
"hash_password_async",
|
||||
"load_auth_config_from_env",
|
||||
"token_error_to_code",
|
||||
"verify_password",
|
||||
"verify_password_async",
|
||||
]
|
||||
Reference in New Issue
Block a user