diff options
| author | kj_sh604 | 2026-04-03 01:27:11 -0400 |
|---|---|---|
| committer | kj_sh604 | 2026-04-03 01:27:11 -0400 |
| commit | ebfd27170bdb4426af2a284a85d195a3cbe9611b (patch) | |
| tree | 208658569e128312e818610139986fe570951803 /auth_backend.py | |
| parent | b5b1a685bf9c2dd172545091c049717360a23648 (diff) | |
refactor: usability and styling simplicity
Diffstat (limited to 'auth_backend.py')
| -rw-r--r-- | auth_backend.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/auth_backend.py b/auth_backend.py index e1ac01c..7219931 100644 --- a/auth_backend.py +++ b/auth_backend.py @@ -5,6 +5,7 @@ import re import sqlite3 import subprocess import sys +import uuid from pathlib import Path from typing import Callable, Optional, Protocol @@ -69,10 +70,10 @@ class LocalMojicryptAuthBackend: with self.connect_db() as conn: conn.execute( """ - INSERT INTO users (username, role, encrypted_challenge, created_at) - VALUES (?, ?, ?, CURRENT_TIMESTAMP) + INSERT INTO users (user_uuid, username, role, encrypted_challenge, created_at) + VALUES (?, ?, ?, ?, CURRENT_TIMESTAMP) """, - (username, role, encrypted), + (str(uuid.uuid4()), username, role, encrypted), ) return True, "user created" except sqlite3.IntegrityError: |
