dev: rest framework throttling (#4534)
This commit is contained in:
parent
4feec35773
commit
410f04c327
7 changed files with 67 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ from plane.authentication.adapter.error import (
|
|||
AuthenticationException,
|
||||
AUTHENTICATION_ERROR_CODES,
|
||||
)
|
||||
|
||||
from plane.authentication.rate_limit import AuthenticationThrottle
|
||||
|
||||
def generate_password_token(user):
|
||||
uidb64 = urlsafe_base64_encode(smart_bytes(user.id))
|
||||
|
|
@ -46,6 +46,10 @@ class ForgotPasswordEndpoint(APIView):
|
|||
AllowAny,
|
||||
]
|
||||
|
||||
throttle_classes = [
|
||||
AuthenticationThrottle,
|
||||
]
|
||||
|
||||
def post(self, request):
|
||||
email = request.data.get("email")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue