Skip to content

refactor: introduce CredentialRepository and ProviderRepository to ce…#347

Merged
manojbajaj95 merged 5 commits into
mainfrom
feature/orthogonal-authsome-modules
May 29, 2026
Merged

refactor: introduce CredentialRepository and ProviderRepository to ce…#347
manojbajaj95 merged 5 commits into
mainfrom
feature/orthogonal-authsome-modules

Conversation

@beubax
Copy link
Copy Markdown
Collaborator

@beubax beubax commented May 28, 2026

Refactor to centralize storage and management logic; move functions into their respective domains

Description

Refactored the authsome server boundary so identity, vault, and auth remain more orthogonal, with server code coordinating them.

Key changes:

  • Moved credential persistence into CredentialRepository.
  • Moved provider resolution into ProviderRepository.
  • Kept server-owned credential key construction inside credential_repository.py.
  • Moved generic auth flow input/planning helpers into auth.utils.
  • Moved server business records into server.schemas.
  • Updated routes, dependencies, and tests to use the new server orchestration shape.

Motivation and Context

AuthService had accumulated too many responsibilities: provider loading, vault key construction, credential persistence, auth flow orchestration, and server policy behavior. This refactor narrows its role to orchestration while keeping storage and provider management in server-owned repositories.

This makes the module boundaries cleaner and prepares auth, identity, and vault to remain reusable independently.

How Has This Been Tested?

Tested with:

uv run pytest
uv run ruff check src/ tests/
uv run ty check src/
uv run pre-commit run --all-files

Result: all tests passed, including the full suite of 361 tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • All new and existing tests passed.

@manojbajaj95 manojbajaj95 merged commit 21955bb into main May 29, 2026
4 checks passed
@manojbajaj95 manojbajaj95 deleted the feature/orthogonal-authsome-modules branch May 29, 2026 08:31
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.

2 participants