Commit graph

1532 commits

Author SHA1 Message Date
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
Maksim Zayakin
128b5c6e25 chore: add venv to .gitignore
Add all environment related things, copy from https://github.com/github/gitignore/blob/main/Python.gitignore
2023-04-26 18:27:33 +03:00
Aleksi Häkli
f491f3dea8
Version 6.0.0b1 2023-04-25 19:44:29 +03:00
Maksim Zayakin
5fb675b588 test: change status code to 429 2023-04-25 19:42:37 +03:00
Maksim Zayakin
a4806ba6b4 docs: update AXES_HTTP_RESPONSE_CODE entry in configuration 2023-04-25 19:42:37 +03:00
Maksim Zayakin
8294fdf756 feat!: set default response code to 429 2023-04-25 19:42:37 +03:00
dependabot[bot]
c036149c6c Bump tox from 4.4.12 to 4.5.0
Bumps [tox](https://github.com/tox-dev/tox) from 4.4.12 to 4.5.0.
- [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.4.12...4.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-25 19:41:02 +03:00
Joe Wesch
6aee1cb8e7 Adds Django Auth LDAP as compatible 2023-04-19 11:39:02 +03:00
dependabot[bot]
c1175982e8
Bump pytest from 7.3.0 to 7.3.1 (#1034)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.0 to 7.3.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.3.0...7.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 16:38:55 +03:30
dependabot[bot]
498aeac86d Bump tox from 4.4.11 to 4.4.12
Bumps [tox](https://github.com/tox-dev/tox) from 4.4.11 to 4.4.12.
- [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.4.11...4.4.12)

---
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-16 19:54:00 +03:00
Aleksi Häkli
8b9474079f
Version 5.41.1 2023-04-16 19:53:06 +03:00
ArtemDemidovAramMeem
0e76956a2e Override log handler when using sensitive parameters. Closes #1010 2023-04-16 19:51:10 +03:00
dependabot[bot]
d3fc47b05b Bump pytest from 7.2.2 to 7.3.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.2 to 7.3.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.2...7.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 18:26:32 +03:00
dependabot[bot]
632cd43222 Bump mypy from 1.1.1 to 1.2.0
Bumps [mypy](https://github.com/python/mypy) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v1.1.1...v1.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-08 20:04:35 +03:00
dependabot[bot]
bad728bee8 Bump coverage from 7.2.2 to 7.2.3
Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.2 to 7.2.3.
- [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.2...7.2.3)

---
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-08 20:04:30 +03:00
dependabot[bot]
15dbdde903 Bump tox from 4.4.8 to 4.4.11
Bumps [tox](https://github.com/tox-dev/tox) from 4.4.8 to 4.4.11.
- [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.4.8...4.4.11)

---
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-08 20:04:22 +03:00
Aleksi Häkli
e56f4c9271
Version 5.41.0 2023-04-02 20:58:58 +03:00
Maksim Zayakin
25f6903899 fix logout tests 2023-04-02 19:34:25 +03:00
dependabot[bot]
6f629f64c9 Bump black from 23.1.0 to 23.3.0
Bumps [black](https://github.com/psf/black) from 23.1.0 to 23.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.1.0...23.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-01 13:39:46 +03:00
Maksim Zayakin
791cce011d add ClientIpAddressTestCase 2023-03-29 16:35:06 +03:00
Maksim Zayakin
91bc75f4a0 add info to docs about AXES_CLIENT_IP_CALLABLE 2023-03-29 16:35:06 +03:00
Maksim Zayakin
c8bfbe603a use AXES_CLIENT_IP_CALLABLE in get_client_ip_address 2023-03-29 16:35:06 +03:00
Maksim Zayakin
7ae0af2a1e add AXES_CLIENT_IP_CALLABLE setting 2023-03-29 16:35:06 +03:00
dependabot[bot]
dccbba7764 Bump tox from 4.4.7 to 4.4.8
Bumps [tox](https://github.com/tox-dev/tox) from 4.4.7 to 4.4.8.
- [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.4.7...4.4.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 10:32:10 +03:00