# `AttestoPhoenix.Schema.LogoutSession`
[🔗](https://github.com/XukuLLC/attesto_phoenix/blob/v0.19.0/lib/attesto_phoenix/schema/logout_session.ex#L1)

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

# `t`

```elixir
@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()
}
```

# `from_record`

```elixir
@spec from_record(
  Attesto.LogoutSessionStore.entry(),
  keyword()
) :: Ecto.Changeset.t()
```

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`

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

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

---

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