Skip to main content

A tiny project to log login attempts. Log them only to standard logging - not the database.

Project description

build license kit format

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_auth_logger-2.2.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_auth_logger-2.2.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file django_auth_logger-2.2.2.tar.gz.

File metadata

  • Download URL: django_auth_logger-2.2.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for django_auth_logger-2.2.2.tar.gz
Algorithm Hash digest
SHA256 0a06b8fa871075d46377be8367445d951bab4e645d7f4f8749118acee9145476
MD5 169c43b4cc68e25a83ff0c2a2aa9f020
BLAKE2b-256 69ed2ca48d30819578550fda2867911b9fd9bd51f25c11212f184238a705cb7b

See more details on using hashes here.

File details

Details for the file django_auth_logger-2.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_auth_logger-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8104ed29daf65df5b992570f3ce048f390816a4fa3748f9759cbaac8eb158175
MD5 ceb90b6dc8067dd9c451c467e5b5ef91
BLAKE2b-256 4f41a7e3fc50f658d14cac3ddac83368653c871049ac6d94fd100709e21e12ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page