Skip to content

Commit

Permalink
Jwt bug fix (#31)
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

* Fix
  • Loading branch information
ruslan33 authored Apr 28, 2024
1 parent 762e6dd commit 913d556
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nopayloaddb/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'changetosomething'
SECRET_KEY = os.environ.get("JWT_SECRET", default='secret')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
Expand Down Expand Up @@ -137,9 +137,9 @@
'DEFAULT_AUTHENTICATION_CLASSES': (
'cdb_rest.authentication.CustomJWTAuthentication',
),
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
#'DEFAULT_PERMISSION_CLASSES': (
# 'rest_framework.permissions.IsAuthenticated',
#),

'TEST_REQUEST_DEFAULT_FORMAT': 'json',
}
Expand All @@ -165,7 +165,7 @@

SIMPLE_JWT = {
'ALGORITHM': 'HS256',
'SIGNING_KEY': os.environ.get("JWT_SECRET", default='secret'),
'SIGNING_KEY': SECRET_KEY ,
'VERIFYING_KEY': None,
'AUTH_TOKEN_CLASSES': ('rest_framework_simplejwt.tokens.AccessToken',),
'AUTH_HEADER_TYPES': ('Bearer',),
Expand Down

0 comments on commit 913d556

Please sign in to comment.