@@ -43,6 +43,7 @@ class LoginView(GenericAPIView):
43
43
permission_classes = (AllowAny ,)
44
44
serializer_class = LoginSerializer
45
45
token_model = TokenModel
46
+ throttle_scope = 'rest_auth'
46
47
47
48
@sensitive_post_parameters_m
48
49
def dispatch (self , * args , ** kwargs ):
@@ -114,6 +115,7 @@ class LogoutView(APIView):
114
115
Accepts/Returns nothing.
115
116
"""
116
117
permission_classes = (AllowAny ,)
118
+ throttle_scope = 'rest_auth'
117
119
118
120
def get (self , request , * args , ** kwargs ):
119
121
if getattr (settings , 'ACCOUNT_LOGOUT_ON_GET' , False ):
@@ -178,6 +180,7 @@ class PasswordResetView(GenericAPIView):
178
180
"""
179
181
serializer_class = PasswordResetSerializer
180
182
permission_classes = (AllowAny ,)
183
+ throttle_scope = 'rest_auth'
181
184
182
185
def post (self , request , * args , ** kwargs ):
183
186
# Create a serializer with request.data
@@ -203,6 +206,7 @@ class PasswordResetConfirmView(GenericAPIView):
203
206
"""
204
207
serializer_class = PasswordResetConfirmSerializer
205
208
permission_classes = (AllowAny ,)
209
+ throttle_scope = 'rest_auth'
206
210
207
211
@sensitive_post_parameters_m
208
212
def dispatch (self , * args , ** kwargs ):
@@ -226,6 +230,7 @@ class PasswordChangeView(GenericAPIView):
226
230
"""
227
231
serializer_class = PasswordChangeSerializer
228
232
permission_classes = (IsAuthenticated ,)
233
+ throttle_scope = 'rest_auth'
229
234
230
235
@sensitive_post_parameters_m
231
236
def dispatch (self , * args , ** kwargs ):
0 commit comments