add rate limit to user

This commit is contained in:
2025-11-30 22:31:46 -03:00
parent 6e726601d2
commit 8d312893fa
5 changed files with 264 additions and 94 deletions

View File

@@ -41,7 +41,7 @@ private_jwk = JsonWebKey.import_key(private_key)
# https://docs.authlib.org/en/v0.12/specs/rfc6750.html#authlib.oauth2.rfc6750.BearerToken.GRANT_TYPES_EXPIRES_IN
GRANT_TYPES_EXPIRES_IN = {
'authorization_code': 60 * 3, # 3 minutes
'authorization_code': 3600, # 1 hour
'refresh_token': 3600, # 1 hour
}