mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-07-23 14:09:46 +03:00
everybody can auth
This commit is contained in:
parent
4bb8c8d12d
commit
ec25bbff0e
|
@ -82,6 +82,7 @@ class Register(APIView, SignupView):
|
||||||
class VerifyEmail(APIView, ConfirmEmailView):
|
class VerifyEmail(APIView, ConfirmEmailView):
|
||||||
|
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
|
authentication_classes = (EverybodyCanAuthentication,)
|
||||||
allowed_methods = ('POST', 'OPTIONS', 'HEAD')
|
allowed_methods = ('POST', 'OPTIONS', 'HEAD')
|
||||||
|
|
||||||
def get(self, *args, **kwargs):
|
def get(self, *args, **kwargs):
|
||||||
|
|
|
@ -85,6 +85,7 @@ class Logout(APIView):
|
||||||
Accepts/Returns nothing.
|
Accepts/Returns nothing.
|
||||||
"""
|
"""
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
|
authentication_classes = (EverybodyCanAuthentication,)
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
try:
|
try:
|
||||||
|
@ -113,6 +114,7 @@ class UserDetails(RetrieveUpdateAPIView):
|
||||||
"""
|
"""
|
||||||
serializer_class = UserDetailsSerializer
|
serializer_class = UserDetailsSerializer
|
||||||
permission_classes = (IsAuthenticated,)
|
permission_classes = (IsAuthenticated,)
|
||||||
|
authentication_classes = (EverybodyCanAuthentication,)
|
||||||
|
|
||||||
def get_object(self):
|
def get_object(self):
|
||||||
return self.request.user
|
return self.request.user
|
||||||
|
@ -129,6 +131,7 @@ class PasswordReset(GenericAPIView):
|
||||||
|
|
||||||
serializer_class = PasswordResetSerializer
|
serializer_class = PasswordResetSerializer
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
|
authentication_classes = (EverybodyCanAuthentication,)
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
# Create a serializer with request.DATA
|
# Create a serializer with request.DATA
|
||||||
|
@ -158,6 +161,7 @@ class PasswordResetConfirm(GenericAPIView):
|
||||||
|
|
||||||
serializer_class = PasswordResetConfirmSerializer
|
serializer_class = PasswordResetConfirmSerializer
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
|
authentication_classes = (EverybodyCanAuthentication,)
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
serializer = self.get_serializer(data=request.DATA)
|
serializer = self.get_serializer(data=request.DATA)
|
||||||
|
@ -183,6 +187,7 @@ class PasswordChange(GenericAPIView):
|
||||||
|
|
||||||
serializer_class = PasswordChangeSerializer
|
serializer_class = PasswordChangeSerializer
|
||||||
permission_classes = (IsAuthenticated,)
|
permission_classes = (IsAuthenticated,)
|
||||||
|
authentication_classes = (EverybodyCanAuthentication,)
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
serializer = self.get_serializer(data=request.DATA)
|
serializer = self.get_serializer(data=request.DATA)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user