Commit graph

75 commits

Author SHA1 Message Date
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
16f96de8fd
Add changelog to documentation 2019-05-03 21:20:45 +03:00
Aleksi Häkli
7d979e2bdc
Update Python version support information in the docs 2019-05-01 18:38:59 +03:00
Aleksi Häkli
0a90a7d075
Improve documentation 2019-05-01 18:28:29 +03:00
Aleksi Häkli
29d7d769e6 Revert name change for cooloff_time template argument 2019-05-01 14:30:21 +03:00
Aleksi Häkli
d4dc3ba246 Improve documentation
Fixes #410
2019-04-27 18:51:02 +03:00
Aleksi Häkli
0a2620095a Fix typo in docs 2019-04-27 18:51:02 +03:00
Aleksi Häkli
1b3bd0f99e Improve command documentation format 2019-04-27 18:51:02 +03:00
Aleksi Häkli
430946a9d1 Rename AxesBaseHandler to AxesHandler 2019-04-27 18:51:02 +03:00
Aleksi Häkli
43cf2b94aa Add upgrade note for Python language support 2019-04-27 18:51:02 +03:00
Aleksi Häkli
41307e6c55 Add API reference into docs 2019-04-27 18:51:02 +03:00
Aleksi Häkli
3dc69a4f56 Clean up documentation line feeds 2019-04-27 18:51:02 +03:00
Aleksi Häkli
9b895941c8 Add section numbering to documentation 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
b55cba78e6
Rename migrating to upgrading in docs
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-03-02 22:40:18 +02:00
Aleksi Häkli
5f61b0ae76
Improve documentation on axes.utils.reset
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-26 13:04:56 +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
e50bbd4701
Enumerate documentation source files
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 22:35:44 +02:00
Aleksi Häkli
6d8aea8aab
Clean up documentation configuration
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 22:02:31 +02:00
Aleksi Häkli
677d4c48f4
Improve documentation
- Add information on handlers
- Document configuration options and precedences
- Restructure documentation for better readability

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 17:04:03 +02:00
Aleksi Häkli
e69d479f6a
Refactor handlers to a more pluggable format
- Define a base handler API with method signatures
- Move proxy handler to a separate path for importability
- Implement a database handler with clean external dependencies
- Change the authentication backend and decorators to use the authentication backend

This enables clean pluggable authentication backend definitions that users
can override and specialize with e.g. cached handlers in their own packages.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-22 19:55:57 +02:00
Aleksi Häkli
139a2b38fb
Update changelog and documentation
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-22 19:55:55 +02:00
Aleksi Häkli
cd56631865
Refactor attempts and add NEVER_LOCKOUT_GET flag
- Move cache and cool off utility functions to the axes.utils module
- Clean up axes.attempts duplicate code in attempt and cache calculations
- Add stable implementation for AccessAttempt attribute calculation
  in the axes.attempts.get_filter_kwargs function

Fixes #398

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-13 18:20:04 +02:00
Aleksi Häkli
a9e9b0d984
Pluggable signal handler backend for lockouts
Implements a proxied API which enables overriding
a handler backend with a user supplied implementation.

Fixes #399

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-07 22:13:30 +02:00
Aleksi Häkli
fcef40748a
Deprecate old signature for AXES_USERNAME_CALLABLE and update documentation
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-07 22:09:21 +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
ecadddbf5d
Improve management commands, docs, and tests
Fixes #362

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:30 +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
Aleksi Häkli
9c328713e7
Use Django checks for cache configuration
Fixes #383

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:28 +02:00
Aleksi Häkli
7c3e21166e
Backwards compatibility fixes for credentials
Revert some of the PR changes to tests to make sure that all of the
old format function invocations work with the old and new tests.

Implement small enchancements to documentation and credentials resolving
for usability and flexibility with custom authentication backends.

Update documentation to indicate that backwards compatibility
is supported as well as the new format credentials invocations.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-12-23 02:58:53 +02:00
Aleksi Häkli
34f9322367
Merge pull request #377 from mastacheata/bugfix/358-credentials-in-favor-of-request
Bugfix #358 credentials in favor of request
2018-12-22 19:30:17 +01:00
Benedikt Bauer
efc02327f3 Enhance configuration docs with detailed credentials description 2018-12-20 16:47:29 +01:00
Benedikt Bauer
af1ff981dd Strip trailing spaces in usage.rst 2018-12-19 18:04:54 +01:00
Benedikt Bauer
a17c7f4706 Strip Whitespace changes from PR 2018-12-19 18:01:56 +01:00
Benedikt Bauer
b6abd9c08e Documentation update to reflect changes to AXES_USERNAME_CALLABLE
AXES_USERNAME_CALLABLE now gets two parameters and
AXES_PASSWORD_FORM_FIELD applies to the credentials dictionary first and only uses the POST fields as a fallback anymore
2018-12-19 15:27:20 +01:00
Aleksi Häkli
06870b08a0
Improve documentation for AXES_IP_WHITELIST config 2018-12-09 16:01:56 +02:00
Arjen
ac4ab22183
Added setting to reset failed attempts on successful login. 2018-10-26 14:45:06 +02:00
Mark Davidoff
72b4f4abe4
Wording change as DRF made some changes 2018-09-28 13:14:20 -07:00
jd
7f5bacab1b add documentation for AXES_USERNAME_CALLABLE 2018-05-24 00:38:04 -07:00
Aleksi Häkli
ff2c1d9834
Bump version to 4.2.1
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-04-18 16:06:07 +03:00
Aleksi Häkli
8bfdf647cc
Bump version to 4.2.0
Fixes #326

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-04-13 14:50:36 +03:00
Aleksi Häkli
512452e580
Add proxy precendence and count configuration
Fixes #286
2018-04-13 13:48:08 +03:00
Aleksi Häkli
d1f1f400b4
Improve project documentation
Add ipware documentation
2018-04-11 20:15:35 +03:00
Aleksi Häkli
d08aaa5602
Merge pull request #315 from markddavidoff/add-middleware
use an authentication backend to check if user is locked out.
2018-04-11 20:02:29 +03:00
Mark Davidoff
07a9adb8f9
Fix link 2018-04-09 16:34:55 -04:00
Javier Junquera Sánchez
ef75697ff8
Update usage.rst
Without `axes_dispatch` decorator, it doesn't lock users.
2018-04-09 09:48:56 +02:00
Mark Davidoff
63e571fb38 updated docs 2018-04-07 11:50:16 -07:00
Aleksi Häkli
27d787fdd6
Bump version to 4.1.0 2018-02-18 13:59:07 +02:00
Aleksi Häkli
5c8d611d96 Update development docs to use tox as test runner 2018-02-18 13:58:06 +02:00
Aleksi Häkli
da18e80569 Clean up quotes styling 2018-02-18 13:58:06 +02:00