Update jwt

This commit is contained in:
MacRimi
2026-03-15 20:43:05 +01:00
parent b7203b8219
commit 602afc2954
6 changed files with 25 additions and 192 deletions
+2 -12
View File
@@ -15,22 +15,12 @@ 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:
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.")
JWT_AVAILABLE = False
print("Warning: PyJWT not available. Authentication features will be limited.")
try:
import pyotp