Skip to main content

1 Welcome to django-auth-adfs-db’s documentation!

Version:

0.3.0

Source:

https://github.com/isprojects/django-auth-adfs-db

Keywords:

ADFS, Django, database, authentication backend

PythonVersion:

3.7

build-status Coverage status

python-versions django-versions pypi-version

A database-backed django-auth-adfs settings class

2 Features

  • Thin layer on top of django-auth-adfs

  • SAAS ready: store ADFS configuration in a database singleton

  • Quick toggle to enable/disable ADFS based auth

  • Hooks into Django’s auth machinery

Django-auth-adfs-db provides a setting class reading out the dynamic ADFS configuration. This moves the ADFS configuration from deploy-time to run-time, and SAAS clients can configure their ADFS integration themselves. No more server reloads of deployment environment variable changes needed!

3 Installation

3.1 Requirements

  • Python 3.6 or higher

  • setuptools 30.3.0 or higher

  • Django 2.1 or higher

  • PostgreSQL (with jsonb field)

3.2 Install

pip install django-auth-adfs-db

This will also install the django-auth-adfs and django-solo packages.

3.3 Django settings

Make sure the following libraries are added to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    "django_auth_adfs"
    "django_auth_adfs_db"
    "solo",
    ...
]

Add django_auth_adfs_db.backends.AdfsAuthCodeBackend to AUTHENTICATION_BACKENDS.

Ensure that LOGIN_URL and LOGIN_REDIRECT_URL are configured. You can set:

LOGIN_URL = reverse_lazy("django_auth_adfs:login")
LOGIN_REDIRECT_URL = "/"

if you wish to make ADFS your primary auth login.

Set the AUTH_ADFS config class:

AUTH_ADFS = {"SETTINGS_CLASS": "django_auth_adfs_db.settings.Settings"}

or a subclass thereof.

Finally, register the URLs in your root config with:

urlpatterns += [path("oauth2/", include("django_auth_adfs.urls")),]

3.4 ADFS login URL on admin login

Template: admin/login.html

{% extends "admin/login.html" %}
{% load solo_tags i18n %}


{% block content %}
{{ block.super }}

{% get_solo 'django_auth_adfs_db.ADFSConfig' as adfs_config %}
{% if adfs_config.enabled %}
<div class="submit-row">
    <a href="{% url 'django_auth_adfs:login' %}">{% trans "Login with ADFS" %}</a>
</div>
{% endif %}
{% endblock %}

4 Usage

You can now configure the ADFS settings in the Django admin.

Please follow the django-auth-adfs documentation for advanced usage.

Metadata

Release files for django-auth-adfs-db 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-auth-adfs-db 0.3.0
File Size Uploaded Provenance
django-auth-adfs-db-0.3.0.tar.gz 10.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-auth-adfs-db 0.3.0
File Interpreter ABI Platform
django_auth_adfs_db-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.3 kB

Release files / django-auth-adfs-db-0.3.0.tar.gz

Download URL django-auth-adfs-db-0.3.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7d2f3ab9b7ad880f80612abd385bf96532e9f4a866d2e6647176b33d513b9d5a
BLAKE2b-256 checksum
How to use checksums
5d9abd6ff93a797107f49cd0997191b7e42990ef0c822200e0fbf91c779e644a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Release files / django_auth_adfs_db-0.3.0-py3-none-any.whl

Download URL django_auth_adfs_db-0.3.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4064a1538ea78ddea73ff3a69ea636316a6c8d31b52161da483995219412262b
BLAKE2b-256 checksum
How to use checksums
9d67bd04038f9d3130024368a7c34c71de2e1078a69082dda09fba4cbdd56116
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Security for django-auth-adfs-db 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page