Skip to content

Commit 8117c75

Browse files
committed
Updated auth endpoints to have AllowAny permission.
1 parent 9eb2557 commit 8117c75

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

drfpasswordless/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
__title__ = 'drfpasswordless'
4-
__version__ = '1.3.0'
4+
__version__ = '1.3.5'
55
__author__ = 'Aaron Ng'
66
__license__ = 'MIT'
77
__copyright__ = 'Copyright 2019 Aaron Ng'

drfpasswordless/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
VERSION = (1, 3, 0)
1+
VERSION = (1, 3, 5)
22

33
__version__ = '.'.join(map(str, VERSION))

drfpasswordless/views.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from rest_framework import parsers, renderers, status
33
from rest_framework.authtoken.models import Token
44
from rest_framework.response import Response
5-
from rest_framework.permissions import IsAuthenticated
5+
from rest_framework.permissions import AllowAny, IsAuthenticated
66
from rest_framework.views import APIView
77
from drfpasswordless.settings import api_settings
88
from drfpasswordless.serializers import (
@@ -62,6 +62,7 @@ def post(self, request, *args, **kwargs):
6262

6363

6464
class ObtainEmailCallbackToken(AbstractBaseObtainCallbackToken):
65+
permission_classes = (AllowAny,)
6566
serializer_class = EmailAuthSerializer
6667
success_response = "A login token has been sent to your email."
6768
failure_response = "Unable to email you a login code. Try again later."
@@ -77,6 +78,7 @@ class ObtainEmailCallbackToken(AbstractBaseObtainCallbackToken):
7778

7879

7980
class ObtainMobileCallbackToken(AbstractBaseObtainCallbackToken):
81+
permission_classes = (AllowAny,)
8082
serializer_class = MobileAuthSerializer
8183
success_response = "We texted you a login code."
8284
failure_response = "Unable to send you a login code. Try again later."

0 commit comments

Comments
 (0)