OpenID Connect authentication support for Django
Project description
This is a Django login view that authenticates against an OpenID Connect Authentication Server.
Use it if you own a single Authentication Server that you want to share between multiple apps.
What is OpenID Connect?
It’s a OAuth2-based standard for authentication in applications.
It can be used for social logins (but django-extauth is much better for this case), and for setting up Single Sign-On into multiple services hosted by the same company. In the last case, it somewhat supersedes LDAP, as with OIDC people are entering their credentials only into the views served by the Authentication Server, and not into all the company’s applications.
Requirements
Python 2.7 / 3.5+
Django 1.10+
Installation
pip install django-auth-oidc
settings.py
INSTALLED_APPS += ['django_auth_oidc']
urls.py
urlpatterns += [
url(r'^accounts/login/', include('django_auth_oidc.urls')),
]
Configuration
Your application
You may specify following settings in the Django settings file:
AUTH_SERVER - OpenID Connect Authorization Server URL.
AUTH_CLIENT_ID - Client ID received from the Authorization Server
AUTH_CLIENT_SECRET - Client secret received from the Authorization Server
AUTH_PROTOCOL (optional) - Legacy protocol supported by openid-connect library, for example github or gitlab. See openid-connect’s documentation for full list of supported protocols.
Or, alternatively, you may set the AUTH_URL environment variable:
AUTH_URL=(protocol+)http(s)://client_id:client_secret@server/
(Note: “:”, “@”, “/” and “%” inside client_id and client_secret must be urlquoted.)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_auth_oidc-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35657df94a3b14bbf4d1fcd40d390f11862fc3b646943cda32cf077dcbddab96 |
|
MD5 | 39bb5fdec36a44a6f65f3fb4bc0e28a4 |
|
BLAKE2b-256 | 3e310d3a0c33c9d03af341c4d2ce84bfa6e68437119326df31c1b1614f256ef2 |