Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

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.

Project description

PyPI Version PyPI Wheel Python Versions License

A Django PAM authentication backend implementation.

The MIT License (MIT)

Overview

This is a simple authentication backend that uses the 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 3.x.

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>

Complete Documentation can be found on Read the Docs at: Django PAM

Download files

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

Files for django-pam, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size django_pam-2.0.0-py2.py3-none-any.whl (20.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-pam-2.0.0.tar.gz (15.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page