Skip to content

Commit a4215dd

Browse files
committed
Remove djangorestframework-simplejwt
1 parent 0b7bb34 commit a4215dd

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

config/settings/base.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
import os
1414

15-
from datetime import timedelta
16-
1715
from .env_reader import env
1816

1917
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
@@ -153,17 +151,6 @@
153151
STATIC_URL = '/static/'
154152
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
155153

156-
157-
# https://django-rest-framework-simplejwt.readthedocs.io/en/latest/settings.html
158-
SIMPLE_JWT = {
159-
'ACCESS_TOKEN_LIFETIME': timedelta(days=30),
160-
'REFRESH_TOKEN_LIFETIME': timedelta(days=31),
161-
# TODO: Open issue for having a callable with a user here
162-
'SIGNING_KEY': env('DJANGO_JWT_SIGNING_KEY', default=SECRET_KEY)
163-
# TODO: https://github.com/SimpleJWT/django-rest-framework-simplejwt/pull/157/files
164-
# Add settings for http support
165-
}
166-
167154
REST_FRAMEWORK = {
168155
'EXCEPTION_HANDLER': 'styleguide_example.api.errors.custom_exception_handler',
169156
'DEFAULT_FILTER_BACKENDS': (

requirements/base.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ Django==3.1.6
22
django-environ==0.4.5
33
psycopg2==2.8.5
44
djangorestframework==3.11.2
5-
djangorestframework-simplejwt==4.4.0
65

76
celery==4.4.6
87
django-celery-results==1.2.1

styleguide_example/api/mixins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
from rest_framework import exceptions as rest_exceptions
44
from rest_framework.permissions import IsAuthenticated
5-
from rest_framework_simplejwt.authentication import JWTAuthentication
5+
from rest_framework.authentication import SessionAuthentication
66

77
from styleguide_example.api.errors import get_error_message
88

99

1010
class ApiAuthMixin:
11-
authentication_classes = (JWTAuthentication, )
11+
authentication_classes = (SessionAuthentication, )
1212
permission_classes = (IsAuthenticated, )
1313

1414

styleguide_example/authentication/apis.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
from rest_framework.views import APIView
22
from rest_framework.response import Response
33

4-
from rest_framework_simplejwt.views import (
5-
TokenObtainPairView,
6-
)
7-
84
from styleguide_example.api.mixins import ApiAuthMixin
95

106
from styleguide_example.users.selectors import user_get_login_data
117

128

13-
class UserLoginApi(TokenObtainPairView):
9+
class UserLoginApi(APIView):
1410
pass
1511

1612

0 commit comments

Comments
 (0)