Metadata-Version: 2.4
Name: django-pam
Version: 3.0.0
Summary: Django PAM authentication backend implementation.
Project-URL: Homepage, https://github.com/cnobile2012/bahai-calendar
Project-URL: Issues, https://github.com/cnobile2012/bahai-calendar/issues
Author-email: "Carl J. Nobile" <carl.nobile@gmail.com>
Maintainer-email: "Carl J. Nobile" <carl.nobile@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: Django,PAM
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.0
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Requires-Dist: python-pam
Description-Content-Type: text/x-rst

==========
Django PAM
==========

.. image:: http://img.shields.io/pypi/l/django-pam.svg
   :target: https://pypi.python.org/pypi/django-pam
   :alt: License

.. image:: http://img.shields.io/pypi/v/django-pam.svg
   :target: https://pypi.python.org/pypi/django-pam
   :alt: PyPI Version

.. image:: http://img.shields.io/pypi/pyversions/django-pam.svg
   :target: https://pypi.python.org/pypi/django-pam
   :alt: Python Versions

.. image:: http://img.shields.io/pypi/wheel/django-pam.svg
   :target: https://pypi.python.org/pypi/django-pam
   :alt: PyPI Wheel

.. image:: https://github.com/cnobile2012/django-pam/actions/workflows/master.yml/badge.svg?branch=master
   :target: https://github.com/cnobile2012/django-pam/actions/workflows/master.yml
   :alt: Build Status

.. image:: https://coveralls.io/repos/github/cnobile2012/django-pam/badge.svg?branch=master&dummy=987654321
   :target: https://coveralls.io/github/cnobile2012/django-pam?branch=master
   :alt: Coverage

.. image:: https://img.shields.io/pypi/dm/django-pam.svg
    :target: https://pypi.python.org/pypi/django-pam
    :alt: PyPI Downloads

A Django PAM authentication backend implementation.

The MIT License (MIT)

Overview
--------

This is a simple authentication backend that uses the
`python-pam <https://github.com/FirefighterBlu3/python-pam>`_
package. Django PAM can be used in an SSO (Single Sign On) environment
or just with a single box where you want to log into a Django app with
your UNIX login.

Updated for Django 6.0.x and Python 3.13.

Python 2.x has been depricated. If you need a version of Django PAM use
version 2.0.1.

Provides
--------

1. PAM Authentication Backend

2. Login and Logout Views

3. Templates for both standard and modal authentication.

4. Supporting JavaScript and CSS.

Quick Start
-----------

You will need to add Django PAM to your ``INSTALLED_APPS``::

  INSTALLED_APPS = [
      ...
      'django_pam',
  ]

Next you will need to add the Django PAM backend to the ``AUTHENTICATION_BACKENDS``::

  AUTHENTICATION_BACKENDS = [
      'django_pam.auth.backends.PAMBackend',
      'django.contrib.auth.backends.ModelBackend',
  ]

The user that runs the application needs to be a member of the
``/etc/shadow`` file group, this is usually the web server user. This
is necessary so the web server can authenticate other users. To do
this run the command below with the proper user::

  $ sudo usermod -a -G shadow <user>

Or if you need to run tests as a different user you can do this::

  $ newgrp shadow
  $ source venv/bin/activate
  $ ./manage.py test

Complete Documentation can be found on
`Read the Docs <https://readthedocs.org/>`_ at:
`Django PAM <http://django-pam.readthedocs.io/en/latest/>`_
