Skip to main content

Module org_backend

Module org_backend 

Source
Expand description

Persistent organization stores. SQLite + Postgres backends behind the pylon_auth::org::OrgBackend trait so orgs / memberships / invites survive a server restart.

Schema: three tables โ€” orgs (id, name, created_by, created_at), org_memberships (org_id, user_id, role, joined_at) with composite PK, and org_invites (id, org_id, email, role, invited_by, token_hash, token_prefix, created_at, expires_at, accepted_at). token_prefix is indexed so accept-by-token is fast.

Structsยง

PostgresOrgBackend
SqliteOrgBackend