""" Custom throttle classes for user-related endpoints. """ from rest_framework.throttling import AnonRateThrottle, UserRateThrottle class LoginRateThrottle(AnonRateThrottle): """ Rate limit for login attempts. Stricter than general anonymous rate to prevent brute force attacks. """ scope = 'login' class RegisterRateThrottle(AnonRateThrottle): """ Rate limit for registration attempts. Prevents automated account creation and abuse. """ scope = 'register' class SyncRateThrottle(UserRateThrottle): """ Rate limit for sync endpoint. Prevents excessive sync requests that could overload the server. """ scope = 'sync'