From 2daa44e5f416e7d876a52b4fbd82a6ef63b7e4ed Mon Sep 17 00:00:00 2001 From: Steve Recio Date: Wed, 3 Jun 2020 09:17:15 -0400 Subject: [PATCH] change throttle scope naming (rest_auth -> dj_rest_auth) --- dj_rest_auth/registration/views.py | 2 +- dj_rest_auth/views.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dj_rest_auth/registration/views.py b/dj_rest_auth/registration/views.py index 02c73b9..d3c0de8 100644 --- a/dj_rest_auth/registration/views.py +++ b/dj_rest_auth/registration/views.py @@ -36,7 +36,7 @@ class RegisterView(CreateAPIView): serializer_class = RegisterSerializer permission_classes = register_permission_classes() token_model = TokenModel - throttle_scope = 'rest_auth' + throttle_scope = 'dj_rest_auth' @sensitive_post_parameters_m def dispatch(self, *args, **kwargs): diff --git a/dj_rest_auth/views.py b/dj_rest_auth/views.py index e68b2ac..dc3dea8 100644 --- a/dj_rest_auth/views.py +++ b/dj_rest_auth/views.py @@ -40,7 +40,7 @@ class LoginView(GenericAPIView): permission_classes = (AllowAny,) serializer_class = LoginSerializer token_model = TokenModel - throttle_scope = 'rest_auth' + throttle_scope = 'dj_rest_auth' @sensitive_post_parameters_m def dispatch(self, *args, **kwargs): @@ -116,7 +116,7 @@ class LogoutView(APIView): Accepts/Returns nothing. """ permission_classes = (AllowAny,) - throttle_scope = 'rest_auth' + throttle_scope = 'dj_rest_auth' def get(self, request, *args, **kwargs): if getattr(settings, 'ACCOUNT_LOGOUT_ON_GET', False): @@ -219,7 +219,7 @@ class PasswordResetView(GenericAPIView): """ serializer_class = PasswordResetSerializer permission_classes = (AllowAny,) - throttle_scope = 'rest_auth' + throttle_scope = 'dj_rest_auth' def post(self, request, *args, **kwargs): # Create a serializer with request.data @@ -245,7 +245,7 @@ class PasswordResetConfirmView(GenericAPIView): """ serializer_class = PasswordResetConfirmSerializer permission_classes = (AllowAny,) - throttle_scope = 'rest_auth' + throttle_scope = 'dj_rest_auth' @sensitive_post_parameters_m def dispatch(self, *args, **kwargs): @@ -269,7 +269,7 @@ class PasswordChangeView(GenericAPIView): """ serializer_class = PasswordChangeSerializer permission_classes = (IsAuthenticated,) - throttle_scope = 'rest_auth' + throttle_scope = 'dj_rest_auth' @sensitive_post_parameters_m def dispatch(self, *args, **kwargs):