Skip to content

refactor(SessionHandler): SessionAdministrator decorates SessionHandler instead of holding components#9

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
refactor/session-administrator-as-decorator
Jun 9, 2026
Merged

refactor(SessionHandler): SessionAdministrator decorates SessionHandler instead of holding components#9
ralflang merged 1 commit into
FRAMEWORK_6_0from
refactor/session-administrator-as-decorator

Conversation

@ralflang

@ralflang ralflang commented Jun 9, 2026

Copy link
Copy Markdown
Member

Reshapes the just-merged SessionAdministrator so it takes a single SessionHandler constructor argument instead of three components (SessionStorageBackend, SessionFactory, SessionSerializer).

All operations route through SessionHandler's existing public API:

  • listAll/load/destroy/expire/getMetadata are pass-throughs
  • findByUser and destroyAllForUser compose over the pass-throughs

Adds expire() and getMetadata() pass-throughs that the original draft was missing. Design rule: code holding SessionAdministrator should never also need to inject SessionHandler directly. Every operation an admin caller might want is now on SessionAdministrator either as a pass-through or as a user-aware composition.

Active-session-only operations on SessionHandler (create, save, regenerate, the SessionHandlerInterface plumbing) are deliberately NOT proxied — they don't make sense for arbitrary stored sessions.

DI consequence: no factory class needed. The Injector autowires the SessionHandler constructor dependency.

Safe to merge: zero consumers exist anywhere in the codebase yet. The original constructor shape was published a few hours ago in #8 and no DI binding was added.

Refs horde/Core#131

…er instead of holding components

Eliminates the three-component construction (backend, factory, serializer) in favor of a single SessionHandler dependency. Operations route through SessionHandler's existing public API:

- listAll/load/destroy/expire/getMetadata are pass-throughs
- findByUser and destroyAllForUser compose over the pass-throughs

Adds expire() and getMetadata() pass-throughs that were previously missing — admin callers should never need to inject both SessionAdministrator and SessionHandler side by side.

DI is now trivial: the Injector autowires the SessionHandler dependency, no factory class needed.
@ralflang ralflang merged commit 3753189 into FRAMEWORK_6_0 Jun 9, 2026
0 of 6 checks passed
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