Skip to main content

Django Federated Login provides an authentication bridge between Django projects and OpenID-enabled identity providers. The bridge is pre-wired to be used with a single Google Apps domain, but could be extended to be linked with other OpenID providers also. It is different from other OpenID consumers as this consumer only allows connecting to a pre-defined identity provider.

The provided backend matches users based on the e-mail address returned from the identity provider. If no matching user could be found, a user account can optionally be created.

Installation

Installation with pip:

$ pip install django-federated-login

Add 'federated_login' to your list of installed apps:

settings.py:
INSTALLED_APPS = (
    ...
    'federated_login',
)

Add 'federated_login.auth.backend.EmailBackend' as authentication backend:

settings.py:
AUTHENTICATION_BACKENDS = (
    'federated_login.auth.backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

Provide the Google Apps domain to identify against:

settings.py:
FL_APPS_DOMAIN = 'webatoom.nl'

Register the views:

urls.py:
url(r'^federated/', include('federated_login.urls')),

Usage

Point your browser to /federated/login/. You might want to include a button to this url on the regular login page.

Extra settings

These are the customizable settings:

FL_APPS_DOMAIN

Google Apps domain to identify against.

FL_CREATE_USERS (Default: False)

Whether to create a user account when unknown e-mail address is presented.

FL_USER_FACTORY (Default: 'aba.utils.fl_user_factory')

Function that is called when creating a user account.

FL_SSO_ENDPOINT (Default: Google Apps)

Override this setting to link with another OpenID identity provider.

Notes

This package depends on a fork of python-openid as the current upstream version (2.2.5) does not play well with a Google extension used by Google Apps identity provider. This fork is not listed on PyPi, so you have to include the following line in your requirements.txt to instruct pip where the patched version of python-openid can be found:

requirements.txt
--find-links https://github.com/Bouke/python-openid/downloads

Metadata

Release files for django-federated-login 0.1.3

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-federated-login 0.1.3
File Size Uploaded Provenance Actions
django-federated-login-0.1.3.tar.gz 5.3 kB Without provenance Details for django-federated-login-0.1.3.tar.gz

Release files / django-federated-login-0.1.3.tar.gz

Download URL django-federated-login-0.1.3.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
42bbeefdcf0575fb17d2bfdcb086b288457755ff41dd16f54cb6f0430a109573
BLAKE2b-256 checksum
How to use checksums
cbefcd97921f0c29676b345f69862d64e221f797beda3a3b1a673d2fd8d26881
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-federated-login 0.1.3

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