AttestoPhoenix.Store.EctoLogoutSessionStore (AttestoPhoenix v0.19.0)

Copy Markdown View Source

Ecto/Postgres implementation of Attesto.LogoutSessionStore.

One row per (session, Relying Party) pair, backing the schema AttestoPhoenix.Schema.LogoutSession:

  • record/1 upserts on (sid, client_id) — re-issuing an ID Token for a session the RP already holds refreshes the row (expiry, uri) rather than duplicating it.
  • targets/1 selects the live rows to notify, scoping to one session when a :sid is given, else to every session for the :subject. Expired rows are filtered out.
  • delete/1 removes the matched rows after the fan-out, so a session is enumerated for logout exactly once.

This persists only the OP-side delivery map; the browser login session is the host's (see Attesto.LogoutSessionStore).