Authentication persistence layer - manages public.auth_users table.
This namespace handles persistence for global authentication credentials in the schema-per-tenant multi-tenancy architecture (ADR-004).
Table: public.auth_users (shared across all tenants) Contains: email, password_hash, mfa_*, failed_login_count, lockout_until, active
Usage:
Does NOT contain:
Authentication persistence layer - manages public.auth_users table. This namespace handles persistence for global authentication credentials in the schema-per-tenant multi-tenancy architecture (ADR-004). Table: public.auth_users (shared across all tenants) Contains: email, password_hash, mfa_*, failed_login_count, lockout_until, active Usage: - Login authentication (verify email + password) - MFA operations (setup, enable, disable, verify) - Account security (lockout, failed login tracking) - Password management (reset, change) Does NOT contain: - User profile data (name, role, avatar) → in tenant_<slug>.users - Tenant-specific settings → in tenant_<slug>.users
(create-auth-user-repository ctx)Create an auth user repository instance using database storage.
Args: ctx: Database context from boundary.platform.shell.adapters.database.factory
Returns: DatabaseAuthUserRepository implementing IAuthUserRepository
Create an auth user repository instance using database storage. Args: ctx: Database context from boundary.platform.shell.adapters.database.factory Returns: DatabaseAuthUserRepository implementing IAuthUserRepository
Authentication user repository interface for public.auth_users table.
Manages global authentication credentials shared across all tenants.
Authentication user repository interface for public.auth_users table. Manages global authentication credentials shared across all tenants.
(find-auth-user-by-email this email)Find authentication record by email (for login).
Args: email: User's email address
Returns: AuthUser entity or nil if not found
Find authentication record by email (for login). Args: email: User's email address Returns: AuthUser entity or nil if not found
(soft-delete-auth-user this user-id)Soft delete authentication record.
Args: user-id: UUID of the user
Returns: true if deleted, false if not found
Soft delete authentication record. Args: user-id: UUID of the user Returns: true if deleted, false if not found
(hard-delete-auth-user this user-id)Hard delete authentication record (permanent).
Args: user-id: UUID of the user
Returns: true if deleted, false if not found
Hard delete authentication record (permanent). Args: user-id: UUID of the user Returns: true if deleted, false if not found
(create-auth-user this auth-user-entity)Create new authentication record.
Args: auth-user-entity: AuthUser entity conforming to schema/AuthUser
Returns: Created AuthUser entity with generated ID and timestamps
Create new authentication record. Args: auth-user-entity: AuthUser entity conforming to schema/AuthUser Returns: Created AuthUser entity with generated ID and timestamps
(mark-backup-code-used this user-id backup-code)Mark a backup code as used.
Args: user-id: UUID of the user backup-code: The backup code that was used
Returns: true if updated
Mark a backup code as used. Args: user-id: UUID of the user backup-code: The backup code that was used Returns: true if updated
(update-password this user-id password-hash)Update user password hash.
Args: user-id: UUID of the user password-hash: New bcrypt password hash
Returns: true if updated, false if user not found
Update user password hash. Args: user-id: UUID of the user password-hash: New bcrypt password hash Returns: true if updated, false if user not found
(find-auth-user-by-id this user-id)Find authentication record by user ID.
Args: user-id: UUID of the user
Returns: AuthUser entity or nil if not found
Find authentication record by user ID. Args: user-id: UUID of the user Returns: AuthUser entity or nil if not found
(clear-lockout this user-id)Clear account lockout.
Args: user-id: UUID of the user
Returns: true if updated
Clear account lockout. Args: user-id: UUID of the user Returns: true if updated
(set-lockout this user-id lockout-until)Set account lockout until specified time.
Args: user-id: UUID of the user lockout-until: Instant when lockout expires
Returns: true if updated
Set account lockout until specified time. Args: user-id: UUID of the user lockout-until: Instant when lockout expires Returns: true if updated
(update-auth-user this auth-user-entity)Update existing authentication record.
Args: auth-user-entity: AuthUser entity with :id and fields to update
Returns: Updated AuthUser entity or throws if not found
Update existing authentication record. Args: auth-user-entity: AuthUser entity with :id and fields to update Returns: Updated AuthUser entity or throws if not found
(enable-mfa this user-id mfa-secret mfa-backup-codes)Enable MFA for user.
Args: user-id: UUID of the user mfa-secret: TOTP secret (base32 encoded) mfa-backup-codes: Vector of backup codes
Returns: true if updated
Enable MFA for user. Args: user-id: UUID of the user mfa-secret: TOTP secret (base32 encoded) mfa-backup-codes: Vector of backup codes Returns: true if updated
(disable-mfa this user-id)Disable MFA for user.
Args: user-id: UUID of the user
Returns: true if updated
Disable MFA for user. Args: user-id: UUID of the user Returns: true if updated
(reset-failed-login this user-id)Reset failed login count to 0.
Args: user-id: UUID of the user
Returns: true if updated
Reset failed login count to 0. Args: user-id: UUID of the user Returns: true if updated
(increment-failed-login this user-id)Increment failed login count for user.
Args: user-id: UUID of the user
Returns: true if updated
Increment failed login count for user. Args: user-id: UUID of the user Returns: true if updated
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |