# `AttestoPhoenix.Store.EctoLogoutSessionStore`
[🔗](https://github.com/XukuLLC/attesto_phoenix/blob/v0.19.0/lib/attesto_phoenix/store/ecto_logout_session_store.ex#L1)

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`).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
