Skip to content

Commit

Permalink
Jwt auth branch (#30)
Browse files Browse the repository at this point in the history
* Create django.yml

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* Functional tests

* JWT settings
  • Loading branch information
ruslan33 authored Apr 28, 2024
1 parent 8907538 commit 762e6dd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions nopayloaddb/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@
# 'DEFAULT_AUTHENTICATION_CLASSES': (
# 'rest_framework.authentication.TokenAuthentication',
# ),
#'DEFAULT_AUTHENTICATION_CLASSES': (
# 'cdb_rest.authentication.CustomJWTAuthentication',
#),
#'DEFAULT_PERMISSION_CLASSES': (
# 'rest_framework.permissions.IsAuthenticated',
#),
'DEFAULT_AUTHENTICATION_CLASSES': (
'cdb_rest.authentication.CustomJWTAuthentication',
),
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),

'TEST_REQUEST_DEFAULT_FORMAT': 'json',
}
Expand All @@ -164,13 +164,13 @@
]

SIMPLE_JWT = {
#'SIGNING_KEY': settings.SECRET_KEY,
#ZZ'VERIFYING_KEY':SECRET_KEY,
'ALGORITHM': 'HS256',
'SIGNING_KEY': os.environ.get("JWT_SECRET", default='secret'),
'VERIFYING_KEY': None,
'AUTH_TOKEN_CLASSES': ('rest_framework_simplejwt.tokens.AccessToken',),
'AUTH_HEADER_TYPES': ('JWT', 'Bearer'),
'AUTH_HEADER_TYPES': ('Bearer',),
'USER_ID_FIELD': 'id',
'USER_ID_CLAIM': 'user_id',

#'JTI_CLAIM': 'jti',
}


Expand Down

0 comments on commit 762e6dd

Please sign in to comment.