AttestoPhoenix.Schema.LogoutSession (AttestoPhoenix v0.19.0)

Copy Markdown View Source

Ecto schema + record bridge for the Back-Channel Logout session store (AttestoPhoenix.Store.EctoLogoutSessionStore).

Backs Attesto.LogoutSessionStore: one row per (session, Relying Party) pair, recording where to POST a logout_token when the session ends. A row is written at ID-Token mint and read/deleted by the end-session endpoint.

This is the OP-side delivery map, not the browser login session — see Attesto.LogoutSessionStore.

Summary

Functions

Build the insert changeset for a back-channel-logout session from the core store record. Fail-closed: a missing required field is rejected, not defaulted.

Fold a loaded row into the Attesto.LogoutSessionStore.target() shape.

Types

t()

@type t() :: %AttestoPhoenix.Schema.LogoutSession{
  __meta__: term(),
  backchannel_logout_uri: term(),
  client_id: term(),
  expires_at: term(),
  id: term(),
  inserted_at: term(),
  session_required: term(),
  sid: term(),
  subject: term()
}

Functions

from_record(record, opts \\ [])

Build the insert changeset for a back-channel-logout session from the core store record. Fail-closed: a missing required field is rejected, not defaulted.

to_target(row)

@spec to_target(t()) :: Attesto.LogoutSessionStore.target()

Fold a loaded row into the Attesto.LogoutSessionStore.target() shape.