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.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.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

django_auth_logger-2.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file django-auth-logger-2.1.0.tar.gz.

File metadata

  • Download URL: django-auth-logger-2.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for django-auth-logger-2.1.0.tar.gz
Algorithm Hash digest
SHA256 00a4de44d2603fe6fd6d7a50605d2c7e7f2a8334b0a92d3d60f0fa0b1f100736
MD5 1368c3cec9b6296d28565c9a628beac6
BLAKE2b-256 bb1a3ee0248341aba2b7fd65b690e3cd25aa41e7952f290a10ba596008104e4c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: django_auth_logger-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for django_auth_logger-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99bc192eb2ddfd46d383a80f741ca195dc4ffc81f8e43b4c221e68bfd6a2dcca
MD5 0411a41b2362af14ab188f99b8cd7f66
BLAKE2b-256 c363fe853b5d6bd79ce84481a7f50207b9eced78bcd00cde621c6ec296b10021

See more details on using hashes here.

Provenance

Supported by

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