@@ -43,6 +43,7 @@ class LoginView(GenericAPIView):
4343 permission_classes = (AllowAny ,)
4444 serializer_class = LoginSerializer
4545 token_model = TokenModel
46+ throttle_scope = 'rest_auth'
4647
4748 @sensitive_post_parameters_m
4849 def dispatch (self , * args , ** kwargs ):
@@ -114,6 +115,7 @@ class LogoutView(APIView):
114115 Accepts/Returns nothing.
115116 """
116117 permission_classes = (AllowAny ,)
118+ throttle_scope = 'rest_auth'
117119
118120 def get (self , request , * args , ** kwargs ):
119121 if getattr (settings , 'ACCOUNT_LOGOUT_ON_GET' , False ):
@@ -178,6 +180,7 @@ class PasswordResetView(GenericAPIView):
178180 """
179181 serializer_class = PasswordResetSerializer
180182 permission_classes = (AllowAny ,)
183+ throttle_scope = 'rest_auth'
181184
182185 def post (self , request , * args , ** kwargs ):
183186 # Create a serializer with request.data
@@ -203,6 +206,7 @@ class PasswordResetConfirmView(GenericAPIView):
203206 """
204207 serializer_class = PasswordResetConfirmSerializer
205208 permission_classes = (AllowAny ,)
209+ throttle_scope = 'rest_auth'
206210
207211 @sensitive_post_parameters_m
208212 def dispatch (self , * args , ** kwargs ):
@@ -226,6 +230,7 @@ class PasswordChangeView(GenericAPIView):
226230 """
227231 serializer_class = PasswordChangeSerializer
228232 permission_classes = (IsAuthenticated ,)
233+ throttle_scope = 'rest_auth'
229234
230235 @sensitive_post_parameters_m
231236 def dispatch (self , * args , ** kwargs ):
0 commit comments