A tiny project to log login attempts. Log them only to standard logging - not the database.
Project description
This is a modest Django app that contains how thelab likes to log authentication for staff users. It may be useful to others, but could easily just be copied.
Install
First, install the package from PyPI.
pip install django-auth-logger
Then, add auth_logger to your Django project’s INSTALLED_APPS setting.
INSTALLED_APPS = [
...
'auth_logger',
...
]
Usage
By default both successful and failed log-ins are logged to standard Python logging (at INFO level).
In the future we may decide to add more configuration options.
Contribution
The scope of this project is small and specific - but we welcome adding configuration settings to change behavior and meet more use cases. All configuration options should have a test to verify it works.
If we do add said configuration it will probably look something like this:
AUTH_LOGGER = {
'LOG_ONLY_STAFF': True
}
Changelog
2.2.0
Support django-ipware v4
2.1.0
Add Django 3.2 to test suite
2.0.0
Update to django-ipware v3
1.1.1
Update test suite for with Django 2.2 and Python 3.8
1.1.0
Log all login attempts, instead of just logins for staff users.
Fix bug which prevented failed login attempts from being correctly logged.
1.0.1
Add support for Django 2.0.
1.0.0
Initial release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_auth_logger-2.2.1.tar.gz
.
File metadata
- Download URL: django_auth_logger-2.2.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3b1c059bc50992e8bdecbf042b22ea45c722429b90637cd8b33baf8f2939fae |
|
MD5 | b94ec011dca8fdad870c14dc4a3b9954 |
|
BLAKE2b-256 | f34df573b07e0ca655bd16851256457fdd0ad69ab57050256b5567f04ed7571d |
File details
Details for the file django_auth_logger-2.2.1-py3-none-any.whl
.
File metadata
- Download URL: django_auth_logger-2.2.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb907076bc26f10b07cfb5d3e20eb4bdf9c5a15cb6b6b6807b6547bc9aa67cc2 |
|
MD5 | 90501177317c38f85ed7b1d94fc02b59 |
|
BLAKE2b-256 | cae018843f6d9dc258b0e96ecda1178cf3bc4409b96ac752143fbc061f346418 |