mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-20 07:01:03 +00:00
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,31 @@
|
||||
"""Authorization layer for the auth plugin."""
|
||||
|
||||
from app.plugins.auth.authorization.authentication import get_auth_context
|
||||
from app.plugins.auth.authorization.hooks import (
|
||||
AuthzHooks,
|
||||
build_authz_hooks,
|
||||
build_permission_provider,
|
||||
build_policy_chain_builder,
|
||||
get_authz_hooks,
|
||||
get_default_authz_hooks,
|
||||
)
|
||||
from app.plugins.auth.authorization.types import (
|
||||
AuthContext,
|
||||
Permissions,
|
||||
ALL_PERMISSIONS,
|
||||
)
|
||||
|
||||
_ALL_PERMISSIONS = ALL_PERMISSIONS
|
||||
|
||||
__all__ = [
|
||||
"AuthContext",
|
||||
"AuthzHooks",
|
||||
"Permissions",
|
||||
"_ALL_PERMISSIONS",
|
||||
"build_authz_hooks",
|
||||
"build_permission_provider",
|
||||
"build_policy_chain_builder",
|
||||
"get_auth_context",
|
||||
"get_authz_hooks",
|
||||
"get_default_authz_hooks",
|
||||
]
|
||||
Reference in New Issue
Block a user