django-auth-logger


Namedjango-auth-logger JSON
Version 2.2.1 PyPI version JSON
download
home_pagehttps://gitlab.com/thelabnyc/django-auth-logger
SummaryA tiny project to log login attempts. Log them only to standard logging - not the database.
upload_time2024-08-31 18:20:47
maintainerNone
docs_urlNone
authorthelab
requires_python<4.0,>=3.10
licenseISC
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ============================
Django Authentication Logger
============================

|  |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.

.. code-block:: bash

    pip install django-auth-logger

Then, add `auth_logger` to your Django project's `INSTALLED_APPS` setting.

.. code-block:: python

    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:

.. code-block:: python

    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.


.. |build| image:: https://gitlab.com/thelabnyc/django-auth-logger/badges/master/build.svg
    :target: https://gitlab.com/thelabnyc/django-auth-logger/commits/master
.. |license| image:: https://img.shields.io/pypi/l/django-auth-logger.svg
    :target: https://pypi.python.org/pypi/
.. |kit| image:: https://badge.fury.io/py/django-auth-logger.svg
    :target: https://pypi.python.org/pypi/django-auth-logger
.. |format| image:: https://img.shields.io/pypi/format/django-auth-logger.svg
    :target: https://pypi.python.org/pypi/django-auth-logger


            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/thelabnyc/django-auth-logger",
    "name": "django-auth-logger",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "thelab",
    "author_email": "thelabdev@thelab.co",
    "download_url": "https://files.pythonhosted.org/packages/f3/4d/f573b07e0ca655bd16851256457fdd0ad69ab57050256b5567f04ed7571d/django_auth_logger-2.2.1.tar.gz",
    "platform": null,
    "description": "============================\nDjango Authentication Logger\n============================\n\n|  |build| |license| |kit| |format|\n\nThis 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.\n\n\nInstall\n=======\n\nFirst, install the package from PyPI.\n\n.. code-block:: bash\n\n    pip install django-auth-logger\n\nThen, add `auth_logger` to your Django project's `INSTALLED_APPS` setting.\n\n.. code-block:: python\n\n    INSTALLED_APPS = [\n        ...\n        'auth_logger',\n        ...\n    ]\n\n\nUsage\n=====\n\nBy default both successful and failed log-ins are logged to standard Python logging (at `INFO` level).\n\nIn the future we may decide to add more configuration options.\n\n\nContribution\n============\n\nThe 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.\n\nIf we do add said configuration it will probably look something like this:\n\n.. code-block:: python\n\n    AUTH_LOGGER = {\n        'LOG_ONLY_STAFF': True\n    }\n\n\n\nChangelog\n=========\n\n2.2.0\n------------------\n- Support django-ipware v4\n\n2.1.0\n------------------\n- Add Django 3.2 to test suite\n\n2.0.0\n------------------\n- Update to django-ipware v3\n\n1.1.1\n------------------\n- Update test suite for with Django 2.2 and Python 3.8\n\n1.1.0\n------------------\n- Log all login attempts, instead of just logins for staff users.\n- Fix bug which prevented failed login attempts from being correctly logged.\n\n1.0.1\n------------------\n- Add support for Django 2.0.\n\n1.0.0\n------------------\n- Initial release.\n\n\n.. |build| image:: https://gitlab.com/thelabnyc/django-auth-logger/badges/master/build.svg\n    :target: https://gitlab.com/thelabnyc/django-auth-logger/commits/master\n.. |license| image:: https://img.shields.io/pypi/l/django-auth-logger.svg\n    :target: https://pypi.python.org/pypi/\n.. |kit| image:: https://badge.fury.io/py/django-auth-logger.svg\n    :target: https://pypi.python.org/pypi/django-auth-logger\n.. |format| image:: https://img.shields.io/pypi/format/django-auth-logger.svg\n    :target: https://pypi.python.org/pypi/django-auth-logger\n\n",
    "bugtrack_url": null,
    "license": "ISC",
    "summary": "A tiny project to log login attempts. Log them only to standard logging - not the database.",
    "version": "2.2.1",
    "project_urls": {
        "Homepage": "https://gitlab.com/thelabnyc/django-auth-logger",
        "Repository": "https://gitlab.com/thelabnyc/django-auth-logger"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cae018843f6d9dc258b0e96ecda1178cf3bc4409b96ac752143fbc061f346418",
                "md5": "90501177317c38f85ed7b1d94fc02b59",
                "sha256": "fb907076bc26f10b07cfb5d3e20eb4bdf9c5a15cb6b6b6807b6547bc9aa67cc2"
            },
            "downloads": -1,
            "filename": "django_auth_logger-2.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "90501177317c38f85ed7b1d94fc02b59",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 4866,
            "upload_time": "2024-08-31T18:20:46",
            "upload_time_iso_8601": "2024-08-31T18:20:46.125530Z",
            "url": "https://files.pythonhosted.org/packages/ca/e0/18843f6d9dc258b0e96ecda1178cf3bc4409b96ac752143fbc061f346418/django_auth_logger-2.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f34df573b07e0ca655bd16851256457fdd0ad69ab57050256b5567f04ed7571d",
                "md5": "b94ec011dca8fdad870c14dc4a3b9954",
                "sha256": "c3b1c059bc50992e8bdecbf042b22ea45c722429b90637cd8b33baf8f2939fae"
            },
            "downloads": -1,
            "filename": "django_auth_logger-2.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b94ec011dca8fdad870c14dc4a3b9954",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 3885,
            "upload_time": "2024-08-31T18:20:47",
            "upload_time_iso_8601": "2024-08-31T18:20:47.482959Z",
            "url": "https://files.pythonhosted.org/packages/f3/4d/f573b07e0ca655bd16851256457fdd0ad69ab57050256b5567f04ed7571d/django_auth_logger-2.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-31 18:20:47",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "thelabnyc",
    "gitlab_project": "django-auth-logger",
    "lcname": "django-auth-logger"
}
        
Elapsed time: 0.29684s