Skip to content

Commit

Permalink
API Key Creation & Management
Browse files Browse the repository at this point in the history
Added functionality for superusers and users to create and manage API keys, with Knox integration for secure key hashing.
  • Loading branch information
NEZRI Ygal authored and NEZRI Ygal committed Jul 19, 2024
1 parent 86967c3 commit ab31d61
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Watcher/Watcher/watcher/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import ldap
from django_auth_ldap.config import LDAPSearch
from datetime import timedelta

# LDAP Setup
AUTH_LDAP_SERVER_URI = os.environ.get('AUTH_LDAP_SERVER_URI', "")
Expand Down Expand Up @@ -150,11 +149,6 @@
('knox.auth.TokenAuthentication',)
}

REST_KNOX = {
'SECURE_HASH_ALGORITHM': 'cryptography.hazmat.primitives.hashes.SHA3_512',
'TOKEN_TTL': timedelta(hours=10),
}

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
Expand Down Expand Up @@ -240,4 +234,4 @@
# https://docs.djangoproject.com/en/1.11/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

0 comments on commit ab31d61

Please sign in to comment.