Commit graph

33 commits

Author SHA1 Message Date
Aleksi Häkli
4b77eb69ee Run black autoformatting 2026-02-11 22:14:31 +02:00
Mounir Messelmeni
04fd39fa57 Enhance get_lockout_response to support original_response parameter 2025-12-19 21:19:03 +02:00
Aleksi Häkli
38e316ca87
Fix code formatting 2023-12-27 12:40:23 +02:00
Taikono-Himazin
6f2584b440 Add async support to middleware 2023-12-13 13:35:22 +09:00
Hasan Ramezani
382468cef4 Add type hint for request variables 2022-05-02 18:21:03 +03:00
Aleksi Häkli
1993a9c9cc Update string syntax 2021-10-11 20:59:06 +03:00
Vasyl Dizhak
8c5c43f482 #750, fix lockout failure when providing AXES_USERNAME_CALLABLE 2021-10-11 20:59:06 +03:00
Aleksi Häkli
1ba5c2bcbb
Remove unused imports 2021-01-04 19:02:04 +02:00
Aleksi Häkli
59bcbd8816 Move DRF integration into signals
Add documentation on how to enable the integration
and remove the logic from global middleware.

Fixes #673
2020-12-18 19:42:43 +02:00
Ashok Argent-Katwala
3a7d154f65 Adjust formatting to match the lint check. 2020-12-02 17:55:30 +02:00
Ashok Argent-Katwala
146d7a20b7 Only do the work in the middleware if axes is enabled. 2020-12-02 17:55:30 +02:00
Anatoly
baf2349adb Apply Black for py36 2020-10-16 11:15:40 +03:00
Anatoly
d0a1338eb4 Update documentation of AxesMiddleware 2020-10-16 11:15:40 +03:00
Anatoly
f17971d339 Update documentation of AxesMiddleware 2020-10-16 11:15:40 +03:00
Anatoly
ae49f3bdae Update django request in the AxesMiddleware if drf is used 2020-10-16 11:15:40 +03:00
Aleksi Häkli
93bb73552e
Upgrade CI tooling to use automatic code formatting 2019-09-28 19:28:17 +03:00
Aleksi Häkli
5ab820db6a
Update architecture docs for exception handling
Version 5.0.5 migrated from exceptions to request flagging
which alters the internal behaviour slightly.
2019-05-25 21:12:50 +03:00
Aleksi Häkli
3152b4d7e9 Improve lockout and request handling
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
2019-05-19 18:32:40 +03:00
Aleksi Häkli
816676f68d Add settings flag for disabling Axes
AXES_ENABLED = False can be used to toggle
the plugin off in tests which use the built-in
Django test client login, force_login and logout
methods which do not supply a request views.

Fixes #433
2019-05-07 23:37:48 +03:00
Aleksi Häkli
0a90a7d075
Improve documentation 2019-05-01 18:28:29 +03:00
Aleksi Häkli
d4dc3ba246 Improve documentation
Fixes #410
2019-04-27 18:51:02 +03:00
Aleksi Häkli
3bece1aaaa
Set Axes request attributes in middleware
Fixes #415

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-03-03 22:13:13 +02:00
Aleksi Häkli
ff6cb8bffd
Move utils to helpers module
In order to offer backwards compatible import path for the
axes.utils.reset function it has to have a separate
implementation that can be imported independently from
the axes.helpers functions that are used by the
AxesBaseHandler implementation.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 22:54:40 +02:00
Aleksi Häkli
715dedc069
Use PEP257 compliant docstrings
Unify docstring representations based on PEP 257

https://www.python.org/dev/peps/pep-0257/

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-07 18:42:54 +02:00
Aleksi Häkli
030810df79
Drop Python 2.7 and Python 3.4 support
Fixes #395

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-07 17:28:26 +02:00
Aleksi Häkli
99175dc57f
Use middleware, backends, and signals for lockouts
Fixes #389

Remove monkey-patching from the application loader phase
and use the Django authentication stack for lockout signals.

Utilize custom AUTHENTICATION_BACKENDS and MIDDLEWARE with signals
with backwards compatible implementation of features.

Update documentation, configuration and migration instructions
to match the new configuration and improve the code commentation.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:30 +02:00
Camilo Nova
730857a158 ☀️ Migrated from Middleware and added support for django 1.10 2016-06-24 11:31:01 -05:00
Patrick Miller
4727fb639f added middleware to decorate views with watched_login 2014-12-23 08:17:34 -07:00
Camilo Nova
3166adb9a4 Removed duplicated watching for the login function, because admin uses the login function from auth.views too. Fixes #17 2013-03-16 18:06:17 -05:00
Mike Blume
b1b0cb390e lots of pep8 fixes 2011-04-12 21:05:32 +00:00
Mike Blume
aa1bc1456b provide more fine-grained control over login patching 2010-10-18 03:32:21 +00:00
codekoala
eafc81b7d8 GC #1 - I've implemented some of the groovy features offered by philipn. Thanks! 2009-12-16 23:24:30 -05:00
wheaties.box
404f02b85c Initial import
--HG--
extra : convert_revision : svn%3A6515f4ec-ab5a-11dd-8fd9-859366ca643a/trunk%402
2008-11-05 22:52:40 +00:00