test(auth): polish token utility tests + docstring (Stage 1 PR1)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1445043649
2026-06-28 11:05:20 +08:00
parent e5ff6e74f9
commit 427709e0a8
2 changed files with 5 additions and 4 deletions
@@ -2,9 +2,9 @@
Format is irreversible once business systems integrate (spec D5):
``dfk_live_<24>`` / ``dfk_test_<24>``. The public ``key_prefix`` is the
first 16 chars (``dfk_live_`` + 7 random) and is stored UNIQUE for audit
logging; the DB only ever stores ``sha256(plaintext)`` hex, never the
plaintext.
leading slice of the plaintext (``dfk_live_`` plus a few random chars,
length ``_PREFIX_LEN``) and is stored UNIQUE for audit logging; the DB
only ever stores ``sha256(plaintext)`` hex, never the plaintext.
"""
from __future__ import annotations