update simple_jwt

This commit is contained in:
MacRimi
2026-03-15 20:00:10 +01:00
parent 513774bb7b
commit b7203b8219
5 changed files with 162 additions and 4 deletions
+12 -2
View File
@@ -15,12 +15,22 @@ import secrets
from datetime import datetime, timedelta
from pathlib import Path
# Try PyJWT first, fall back to our simple implementation
try:
import jwt
JWT_AVAILABLE = True
JWT_BACKEND = "pyjwt"
except ImportError:
JWT_AVAILABLE = False
print("Warning: PyJWT not available. Authentication features will be limited.")
try:
# Use our simple JWT implementation (no external dependencies)
import simple_jwt as jwt
JWT_AVAILABLE = True
JWT_BACKEND = "simple_jwt"
print("Using simple_jwt backend (no cryptography dependency)")
except ImportError:
JWT_AVAILABLE = False
JWT_BACKEND = None
print("Warning: No JWT backend available. Authentication features will be limited.")
try:
import pyotp