mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-09 08:04:44 +00:00
The old architecture used exceptions in the signal handler which prevented transactions from running smoothly and signal handlers from running after Axes handlers. The new architecture changes the request approach to request flagging and moves the exception handling into the middleware call method. This allows users to more flexibly run their own signal handlers and optionally use the Axes middleware if they want to do so. Fixes #440 Fixes #442
17 lines
400 B
Python
17 lines
400 B
Python
from django.core.exceptions import PermissionDenied
|
|
|
|
|
|
class AxesBackendPermissionDenied(PermissionDenied):
|
|
"""
|
|
Raised by authentication backend on locked out requests to stop the Django authentication flow.
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
class AxesBackendRequestParameterRequired(ValueError):
|
|
"""
|
|
Raised by authentication backend on invalid or missing request parameter value.
|
|
"""
|
|
|
|
pass
|