Skip to content

src/dazzle_back/runtime/auth/store.py

Generated: 2026-03-30T04:38:46.980116+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Authentication store (PostgreSQL) — user CRUD, sessions, and 2FA state.

Key Exports

  • UserStoreMixin
  • TwoFactorMixin
  • SessionStoreMixin
  • AuthStore
  • create_user
  • get_user_by_email
  • get_user_by_id
  • authenticate
  • update_password
  • create_password_reset_token
  • validate_password_reset_token
  • consume_password_reset_token
  • list_users
  • update_user
  • enable_totp
  • disable_totp
  • enable_email_otp
  • disable_email_otp
  • set_recovery_codes_generated
  • get_totp_secret

Dependencies

Imports

  • logging
  • secrets
  • datetime.UTC
  • datetime.datetime
  • datetime.timedelta
  • typing.Any
  • uuid.UUID
  • crypto.hash_password
  • crypto.verify_password
  • models.AuthContext
  • models.SessionRecord
  • models.UserRecord
  • psycopg
  • psycopg.rows.dict_row
  • json
  • json
  • json
  • json
  • dazzle_back.runtime.query_builder.quote_identifier
  • uuid.UUID

Event Interactions

None detected.

Invariants and Assumptions

  • Add 2FA columns if they don't exist (idempotent migration)

Tests

  • tests/unit/sentinel/test_store.py
  • tests/unit/test_system_entity_store.py
  • tests/unit/test_grant_store.py
  • tests/unit/test_activity_store.py
  • tests/unit/test_otp_store.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.