Skip to content

[SB-167] Add explicit local sessions and provider-aware token caching - #156

Draft
VargaJoe wants to merge 1 commit into
developfrom
codex/sb-167-internal-auth
Draft

VargaJoe wants to merge 1 commit into
developfrom
codex/sb-167-internal-auth

Conversation

@VargaJoe

Copy link
Copy Markdown
Contributor

Adds LocalTokenProvider login/MFA and an in-memory session scoped to repository, issuer and user. The transport refreshes proactively, retries one 401 for replayable requests, rejects cross-repository use and clears sessions on logout without API-key/basic fallback. Human passwords are never stored in options.

Adds an extensible provider registry with IdentityServer as the default, token-cache isolation by provider and identity, JWT-exp-based cache limits and fresh token lookup on every ServerContextFactory call. API keys and supplied bearer tokens bypass provider acquisition. SNAuth-issued bearer tokens remain supported; local user credentials are not treated as an unattended client-credentials grant.

Validation: 467 unit tests passed, including eight new session/cache/factory/DI transport regressions. Tests use controlled HTTP responses, not a live repository. See docs/local-authentication.md for usage and the 16 MiB replay limit.

Built in an isolated worktree; pre-existing changes in the original checkout are excluded.

Companion changes: SenseNet/sensenet and SenseNet/sn-client, both on codex/sb-167-internal-auth. Add their PR links after creation.

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.

1 participant