Skip to main content

Django PAM authentication backend implementation.

Project description

License PyPI Version Python Versions PyPI Wheel Build Status Coverage PyPI Downloads

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

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

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_pam-3.0.1.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_pam-3.0.1-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file django_pam-3.0.1.tar.gz.

File metadata

  • Download URL: django_pam-3.0.1.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1

File hashes

Hashes for django_pam-3.0.1.tar.gz
Algorithm Hash digest
SHA256 da1094b049debfac0dfd052c420ca82306ff6a95f7f9e72106bdb5b4e5dd70c2
MD5 f28cf295dd0c0d5b79fa1ee02740508a
BLAKE2b-256 2969525b06667dabbb3b65b5eff8e6a45450113cf041d6600d9728212bd1357f

See more details on using hashes here.

File details

Details for the file django_pam-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: django_pam-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1

File hashes

Hashes for django_pam-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 499ef457eac351c2f132c130a2aba1bb3adadb177a9510fa36271fcec72aff43
MD5 c52d5bcaefdd27a7ebe07cae09a62e4a
BLAKE2b-256 079b05ad68cdb38c32c045303493dd70538b7bbc523af9ea93e927deb6b53946

See more details on using hashes here.

Supported by

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