Skip to content

feat(core): AuthService facade wrapping auth_manager.py#655

Merged
ShaerWare merged 1 commit intomainfrom
server/642-auth-service-facade
Mar 29, 2026
Merged

feat(core): AuthService facade wrapping auth_manager.py#655
ShaerWare merged 1 commit intomainfrom
server/642-auth-service-facade

Conversation

@ShaerWare
Copy link
Copy Markdown
Owner

Summary

Phase 7.1 (#642): class-based AuthService facade implementing the Protocol from modules/core/protocols.py.

  • modules/core/auth_service.pyAuthService class with all 11 Protocol methods, delegating to existing auth_manager functions (Strangler Fig) and to UserService/RoleService/WorkspaceService for user/role/workspace lookups
  • modules/core/startup.py — event handlers migrated from from auth_manager import _member_role_cache to from modules.core.auth_service import auth_service
  • tests/unit/test_auth_service.py — Protocol compliance tests (all methods + signatures), TypedDict converter tests, singleton export test

FastAPI dependencies (require_permission, get_current_user, etc.) stay in auth_manager.py — they are not part of the Protocol.

Closes #642

Test plan

  • All 152 tests pass (pytest tests/ -v)
  • Ruff lint + format clean
  • CI green
  • Verify admin panel login works after deploy

🤖 Generated with Claude Code

Phase 7.1: class-based AuthService implementing the Protocol from
modules/core/protocols.py. Delegates to existing auth_manager functions
(Strangler Fig) and to UserService/RoleService/WorkspaceService for
user/role/workspace lookups. Migrates startup.py event handlers to use
auth_service instead of importing _member_role_cache directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ShaerWare ShaerWare merged commit ba50b9b into main Mar 29, 2026
3 checks passed
@ShaerWare ShaerWare deleted the server/642-auth-service-facade branch March 29, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 7.1: AuthService facade — обернуть auth_manager.py в класс

2 participants