diff --git a/auth_token/contrib/rest_framework_auth/views.py b/auth_token/contrib/rest_framework_auth/views.py index 2ec6f39..12d1179 100644 --- a/auth_token/contrib/rest_framework_auth/views.py +++ b/auth_token/contrib/rest_framework_auth/views.py @@ -1,9 +1,7 @@ from auth_token.contrib.common.views import LoginView as _LoginView from auth_token.contrib.common.views import LogoutView as _LogoutView from auth_token.utils import login, logout -from rest_framework.compat import coreapi, coreschema from rest_framework.response import Response -from rest_framework.schemas import ManualSchema from rest_framework.views import APIView from .serializers import ( @@ -17,39 +15,6 @@ class LoginAuthToken(APIView): permission_classes = () authentication_classes = () serializer_class = AuthTokenSerializer - if coreapi is not None and coreschema is not None: - schema = ManualSchema( - fields=[ - coreapi.Field( - name='username', - required=True, - location='form', - schema=coreschema.String( - title='Username', - description='Valid username for authentication', - ), - ), - coreapi.Field( - name='password', - required=True, - location='form', - schema=coreschema.String( - title='Password', - description='Valid password for authentication', - ), - ), - coreapi.Field( - name='permanent', - required=False, - location='form', - schema=coreschema.Boolean( - title='Permanent', - description='Define if login can expire', - ), - ), - ], - encoding='application/json', - ) allowed_cookie = False allowed_header = True @@ -71,30 +36,6 @@ class MobileLoginAuthToken(APIView): permission_classes = () authentication_classes = () serializer_class = MobileAuthTokenSerializer - if coreapi is not None and coreschema is not None: - schema = ManualSchema( - fields=[ - coreapi.Field( - name='uuid', - required=True, - location='form', - schema=coreschema.String( - title='Device UUID', - description='Valid device UUID for authentication', - ), - ), - coreapi.Field( - name='login_device_token', - required=True, - location='form', - schema=coreschema.String( - title='Password', - description='Valid token for authentication', - ), - ), - ], - encoding='application/json', - ) allowed_cookie = False allowed_header = True @@ -122,21 +63,6 @@ def delete(self, request, *args, **kwargs): class MobileRegisterToken(APIView): serializer_class = MobileAuthTokenRegisterSerializer - if coreapi is not None and coreschema is not None: - schema = ManualSchema( - fields=[ - coreapi.Field( - name='uuid', - required=True, - location='form', - schema=coreschema.String( - title='Device UUID', - description='Valid device UUID for authentication', - ), - ), - ], - encoding='application/json', - ) def post(self, request, *args, **kwargs): serializer = self.serializer_class(data=request.data, diff --git a/auth_token/version.py b/auth_token/version.py index 94e7190..1cc9808 100644 --- a/auth_token/version.py +++ b/auth_token/version.py @@ -1,4 +1,4 @@ -VERSION = (0, 7, 1) +VERSION = (0, 7, 2) def get_version(): diff --git a/example/requirements.txt b/example/requirements.txt index 5cc28a0..6507039 100644 --- a/example/requirements.txt +++ b/example/requirements.txt @@ -2,7 +2,7 @@ skip-django-germanium==2.6.0 coveralls flake8 skip-django-is-core==2.29.0 -djangorestframework==3.14.0 +djangorestframework==3.18.0 freezegun==1.0.0 responses==0.22.0 httpretty==1.1.4