From fb81f594289077655477279581c13e3b387cfb6a Mon Sep 17 00:00:00 2001 From: NEZRI Ygal Date: Tue, 23 Jul 2024 23:59:54 +0200 Subject: [PATCH] API Key Creation & Management Added functionality for superusers and users to create and manage API keys, with Knox integration for secure key hashing. --- Watcher/Watcher/watcher/settings.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Watcher/Watcher/watcher/settings.py b/Watcher/Watcher/watcher/settings.py index 13d93ef..bcaaa8c 100755 --- a/Watcher/Watcher/watcher/settings.py +++ b/Watcher/Watcher/watcher/settings.py @@ -151,12 +151,10 @@ } REST_KNOX = { - 'SECURE_HASH_ALGORITHM': 'hashlib.sha3_512', + 'SECURE_HASH_ALGORITHM': 'cryptography.hazmat.primitives.hashes.SHA3_512', 'TOKEN_TTL': timedelta(hours=10), } -KNOX_TOKEN_MODEL = 'knox.AuthToken' - MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware',