mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-02-23 13:20:34 +03:00
change throttle scope naming (rest_auth -> dj_rest_auth)
This commit is contained in:
parent
c03558bd2f
commit
2daa44e5f4
|
@ -36,7 +36,7 @@ class RegisterView(CreateAPIView):
|
||||||
serializer_class = RegisterSerializer
|
serializer_class = RegisterSerializer
|
||||||
permission_classes = register_permission_classes()
|
permission_classes = register_permission_classes()
|
||||||
token_model = TokenModel
|
token_model = TokenModel
|
||||||
throttle_scope = 'rest_auth'
|
throttle_scope = 'dj_rest_auth'
|
||||||
|
|
||||||
@sensitive_post_parameters_m
|
@sensitive_post_parameters_m
|
||||||
def dispatch(self, *args, **kwargs):
|
def dispatch(self, *args, **kwargs):
|
||||||
|
|
|
@ -40,7 +40,7 @@ class LoginView(GenericAPIView):
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
serializer_class = LoginSerializer
|
serializer_class = LoginSerializer
|
||||||
token_model = TokenModel
|
token_model = TokenModel
|
||||||
throttle_scope = 'rest_auth'
|
throttle_scope = 'dj_rest_auth'
|
||||||
|
|
||||||
@sensitive_post_parameters_m
|
@sensitive_post_parameters_m
|
||||||
def dispatch(self, *args, **kwargs):
|
def dispatch(self, *args, **kwargs):
|
||||||
|
@ -116,7 +116,7 @@ class LogoutView(APIView):
|
||||||
Accepts/Returns nothing.
|
Accepts/Returns nothing.
|
||||||
"""
|
"""
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
throttle_scope = 'rest_auth'
|
throttle_scope = 'dj_rest_auth'
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
if getattr(settings, 'ACCOUNT_LOGOUT_ON_GET', False):
|
if getattr(settings, 'ACCOUNT_LOGOUT_ON_GET', False):
|
||||||
|
@ -219,7 +219,7 @@ class PasswordResetView(GenericAPIView):
|
||||||
"""
|
"""
|
||||||
serializer_class = PasswordResetSerializer
|
serializer_class = PasswordResetSerializer
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
throttle_scope = 'rest_auth'
|
throttle_scope = 'dj_rest_auth'
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
# Create a serializer with request.data
|
# Create a serializer with request.data
|
||||||
|
@ -245,7 +245,7 @@ class PasswordResetConfirmView(GenericAPIView):
|
||||||
"""
|
"""
|
||||||
serializer_class = PasswordResetConfirmSerializer
|
serializer_class = PasswordResetConfirmSerializer
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
throttle_scope = 'rest_auth'
|
throttle_scope = 'dj_rest_auth'
|
||||||
|
|
||||||
@sensitive_post_parameters_m
|
@sensitive_post_parameters_m
|
||||||
def dispatch(self, *args, **kwargs):
|
def dispatch(self, *args, **kwargs):
|
||||||
|
@ -269,7 +269,7 @@ class PasswordChangeView(GenericAPIView):
|
||||||
"""
|
"""
|
||||||
serializer_class = PasswordChangeSerializer
|
serializer_class = PasswordChangeSerializer
|
||||||
permission_classes = (IsAuthenticated,)
|
permission_classes = (IsAuthenticated,)
|
||||||
throttle_scope = 'rest_auth'
|
throttle_scope = 'dj_rest_auth'
|
||||||
|
|
||||||
@sensitive_post_parameters_m
|
@sensitive_post_parameters_m
|
||||||
def dispatch(self, *args, **kwargs):
|
def dispatch(self, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user