Add a token prefix

This commit is contained in:
Jeremy Stretch
2025-10-06 17:04:10 -04:00
parent 82db8a9c02
commit c63e60a62b
10 changed files with 41 additions and 45 deletions

View File

@@ -11,6 +11,7 @@ OBJECTPERMISSION_OBJECT_TYPES = Q(
CONSTRAINT_TOKEN_USER = '$user'
# API tokens
TOKEN_KEY_LENGTH = 16
TOKEN_PREFIX = 'nbt_' # Used for v2 tokens only
TOKEN_KEY_LENGTH = 12
TOKEN_DEFAULT_LENGTH = 40
TOKEN_CHARSET = string.ascii_letters + string.digits