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

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

Uploaded Source

Built Distribution

django_auth_logger-1.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-auth-logger-1.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.6

File hashes

Hashes for django-auth-logger-1.1.1.tar.gz
Algorithm Hash digest
SHA256 7a6ed93c441a0a6d1179dc8a2464b9881f5bc37f564f681b17e1ca586a70f520
MD5 e4ec7840477acf67de1af878308ba2e5
BLAKE2b-256 f8d58ef53abbea3718c206c32abf260fb96b6d1b4e84593f07df7914923e56de

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: django_auth_logger-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.6

File hashes

Hashes for django_auth_logger-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff760574c7bdb63f062f9e5fda6457597c08370d78bc6bd2aeec8792045b596d
MD5 2e49adbcb2eac398a1bad5ed230c361c
BLAKE2b-256 7a41d6a263b529514a774eeaac371c1f92363dfa229db8dd2c785dd0ccd826b5

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