AttestoPhoenix.Store.EctoLogoutSessionStore (AttestoPhoenix v4.2.1)

Copy Markdown View Source

Ecto/Postgres implementation of Attesto.LogoutSessionStore.

One row per (session, Relying Party) pair — carrying the RP's back-channel and/or front-channel logout URI — 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.
  • lease_targets/4 reserves live rows atomically. Successful deliveries are deleted with acknowledge_targets/2; failed work is deferred with release_targets/2 using bounded exponential backoff, and crashed workers' leases expire for retry. The supervised AttestoPhoenix.Store.Sweeper reclaims due or expired leases every configured :sweep_interval_ms.
  • The legacy targets/1, delete/1, and take_targets/1 callbacks remain for compatibility with Attesto 2.5 and earlier callers.

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