Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions auth_token/contrib/rest_framework_auth/views.py
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion auth_token/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = (0, 7, 1)
VERSION = (0, 7, 2)


def get_version():
Expand Down
2 changes: 1 addition & 1 deletion example/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading