Commit graph

1555 commits

Author SHA1 Message Date
Aleksi Häkli
1965d2f2ba
Update CHANGES.rst
Version 6.0.0b5
2023-05-15 00:42:13 +03:00
Maksim Zayakin
58d5b491d8 test: add deprecation check for is_admin_site, add is_admin_request tests 2023-05-14 23:01:58 +03:00
Maksim Zayakin
117db49091 feat: add is_admin_request, deprecate is_admin_site 2023-05-14 23:01:58 +03:00
Aleksi Häkli
102cdc3ecf
Fix typo 2023-05-13 14:52:37 +03:00
Aleksi Häkli
1e7e85e101
Improve documentation 2023-05-13 14:43:20 +03:00
dependabot[bot]
fe130af344
Bump mypy from 1.2.0 to 1.3.0
Bumps [mypy](https://github.com/python/mypy) from 1.2.0 to 1.3.0.
- [Commits](https://github.com/python/mypy/compare/v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2023-05-13 14:27:28 +03:00
Aleksi Häkli
3e13c8f85e
Version 6.0.0b4 2023-05-13 14:09:12 +03:00
Maksim Zayakin
f6e272cb61 docs: add AXES_LOCKOUT_PARAMETERS` entires 2023-05-13 14:04:14 +03:00
Maksim Zayakin
3cba78a599 refactor: fix qa errors 2023-05-13 14:04:14 +03:00
Maksim Zayakin
c66bb1fb2b test: add new client parameters tests 2023-05-13 14:04:14 +03:00
Maksim Zayakin
166c431b25 test: add callable AXES_LOCKOUT_PARAMETERS test cases and tests with wrong lockout parameters 2023-05-13 14:04:14 +03:00
Maksim Zayakin
43cc1ef39e test: add new login tests 2023-05-13 14:04:14 +03:00
Maksim Zayakin
0823584b02 refactor: fix prospector errors 2023-05-13 14:04:14 +03:00
Maksim Zayakin
73c4e4501b chore: adjust types: use list instead of iterables and nested lists instead of tuples 2023-05-13 14:04:14 +03:00
Maksim Zayakin
d5c6073bd7 test: use AXES_LOCKOUT_PARAMETERS in login test 2023-05-13 14:04:14 +03:00
Maksim Zayakin
a12c8bd6da test: use AXES_LOCKOUT_PARAMETERS in logging test 2023-05-13 14:04:14 +03:00
Maksim Zayakin
7ee8573939 test: use AXES_LOCKOUT_PARAMETERS in helpers test 2023-05-13 14:04:14 +03:00
Maksim Zayakin
7cb0144770 test: use AXES_LOCKOUT_PARAMETERS in handlers test 2023-05-13 14:04:14 +03:00
Maksim Zayakin
c3586ac3dc test: use AXES_LOCKOUT_PARAMETERS in attempts test 2023-05-13 14:04:14 +03:00
Maksim Zayakin
8d4a0aa052 chore!: pass request and credentials to get_client_parameters 2023-05-13 14:04:14 +03:00
Maksim Zayakin
1e3d41228d feat!: implement reset_request using get_lockout_parameters 2023-05-13 14:04:14 +03:00
Maksim Zayakin
476d3f52bc chore: use get_lockout_parameters in handlers 2023-05-13 14:04:14 +03:00
Maksim Zayakin
07539ff3d7 chore!: use AXES_LOCKOUT_PARAMETERS in app init log message 2023-05-13 14:04:14 +03:00
Maksim Zayakin
2df1c1948a refactor: refactor get_client_parameters
* Now accepts request_or_attempt and credentials which are passed to get_lockout_parameters
* Use lockout parameters that consumed from get_lockout_parameters
2023-05-13 14:04:14 +03:00
Maksim Zayakin
59a57386c1 feat: add get_lockout_parameters
Accepts request or AccessAttempt and optionally credentials. If AXES_LOCKOUT_PARAMETERS is callable, this function passes request or attempt and credentials to this callable and returns the result.
If AXES_LOCKOUT_PARAMETERS is iterable, returns AXES_LOCKOUT_PARAMETERS.
Otherwise raises TypeError.
2023-05-13 14:04:14 +03:00
Maksim Zayakin
97022a460d chore!: deprecate params related to lockout parameters resolution 2023-05-13 14:04:14 +03:00
Maksim Zayakin
ffc161e814 feat!: add AXES_LOCKOUT_PARAMETERS flag
BREAKING CHANGE: add `AXES_LOCKOUT_PARAMETERS` flag which accepts an iterable of keys or a callable that resolves an iterable.
The key can be a string (represents a single parameter) or an Iterable of strings (represents a combined parameter).
For example, using this parameters
```python
AXES_LOCKOUT_PARAMETERS = [
    "ip_address",
    ("username", "user_agent"),
]
```
axes will block users by IP and/or combination of username and user agent
2023-05-13 14:04:14 +03:00
Maksim Zayakin
9dfea8bf8e chore: fix inaccuracies in russian locale 2023-05-13 13:53:57 +03:00
dependabot[bot]
79660a7cc2 Bump prospector from 1.9.0 to 1.10.0
Bumps [prospector](https://github.com/PyCQA/prospector) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/PyCQA/prospector/releases)
- [Changelog](https://github.com/PyCQA/prospector/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/PyCQA/prospector/compare/v1.9.0...1.10.0)

---
updated-dependencies:
- dependency-name: prospector
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-13 13:45:45 +03:00
Aleksi Häkli
b985981d11
Update supported Django versions specifiers 2023-05-01 21:39:04 +03:00
Aleksi Häkli
ad2f21a856
Revert language change 2023-05-01 21:34:33 +03:00
Aleksi Häkli
9b7b1e6aac
Version 6.0.0b3 2023-05-01 21:31:16 +03:00
Aleksi Häkli
8386f30dbb Fix type annotations for cache utilities 2023-05-01 21:27:47 +03:00
Aleksi Häkli
c3cfb5150a Refactor cache backend to use cache.incr method for request tracking
The old cache.set method has problems with correctness as well as
performance on higher traffic sites where there are
multiple parallel web servers running at the same time
which can overwrite each others shared cache
2023-05-01 21:27:47 +03:00
Aleksi Häkli
9924077a2a Rename get_cache_key to get_cache_keys 2023-05-01 21:27:47 +03:00
dependabot[bot]
feca1ed6d4 Bump coverage from 7.2.4 to 7.2.5
Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.4 to 7.2.5.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/7.2.4...7.2.5)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 17:55:02 +03:00
dependabot[bot]
9b3a75cdbb Bump coverage from 7.2.3 to 7.2.4
Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.3 to 7.2.4.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/7.2.3...7.2.4)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-28 16:21:28 +03:00
Aleksi Häkli
63c57c898b
Correct CHANGES word ordering 2023-04-28 14:28:51 +03:00
Aleksi Häkli
107b9b8508
Update CHANGES.rst 2023-04-28 14:23:59 +03:00
Aleksi Häkli
31249a5947 Update django-ipware configuration flags to new AXES_IPWARE_ prefixes
Use explicit new AXES_IPWARE_ referencing configuration flag names
in place of the old plain implicit AXES_ name prefixes
2023-04-28 14:16:44 +03:00
Aleksi Häkli
cd950ddfef Make ipware an optional dependency
Relates to #1038
2023-04-28 14:16:44 +03:00
Aleksi Häkli
700ea46607
Adjust GitHub and tox matrix to match current version support state 2023-04-28 13:08:26 +03:00
Aleksi Häkli
1d13338cdb
Drop PyPy 3.8 outcome ignores from test matrix 2023-04-28 12:31:10 +03:00
Aleksi Häkli
d12ee8270c
Drop Django 4.1 support from test matrix 2023-04-28 12:31:10 +03:00
Aleksi Häkli
f13475803b
Add Django 4.2 support to test matrix 2023-04-28 12:31:10 +03:00
dependabot[bot]
f376ab6c7f Bump tox from 4.5.0 to 4.5.1
Bumps [tox](https://github.com/tox-dev/tox) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.5.0...4.5.1)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-27 22:05:08 +03:00
Maksim Zayakin
ced022adfd docs: fix divider line after contributing section 2023-04-27 22:04:55 +03:00
Maksim Zayakin
8c9b753430 docs: rename 9_development.rst to 9_contributing.rst 2023-04-27 22:04:55 +03:00
Maksim Zayakin
3c1bb683ff docs: fix link to CONTRIBUTING in README 2023-04-27 22:04:55 +03:00
Maksim Zayakin
833ef9669f docs: add CONTRIBUTING.rst 2023-04-27 22:04:55 +03:00