from django.conf import settings as django_settings

AJAX_ACCESS = getattr(django_settings, "AJAX_ACCESS", {})

LOGIN_RATELIMIT = AJAX_ACCESS.get("LOGIN_RATELIMIT", {})

LOGIN_RATELIMIT_KEY = LOGIN_RATELIMIT.get("KEY", "ip")

LOGIN_RATELIMIT_RATE = LOGIN_RATELIMIT.get("RATE", "3/h")

LOGIN_RATELIMIT_BLOCK = LOGIN_RATELIMIT.get("BLOCK", True)

LOGOUT_RATELIMIT = AJAX_ACCESS.get("LOGOUT_RATELIMIT", {})

LOGOUT_RATELIMIT_KEY = LOGOUT_RATELIMIT.get("KEY", "ip")

LOGOUT_RATELIMIT_RATE = LOGOUT_RATELIMIT.get("RATE", "3/h")

LOGOUT_RATELIMIT_BLOCK = LOGOUT_RATELIMIT.get("BLOCK", True)
