EPITA backend for python-social-auth
Project description
social-auth-backend-epita
Pluggable authentication backend for python-social-auth that allows
authentication with the CRI OpenID Connect provider.
Installation instructions
$ pip install social-auth-backend-epita --index-url https://gitlab.cri.epita.fr/api/v4/projects/515/packages/pypi/simple
Configuration instructions
Django
You should take a look at our example project to see how to properly use this package.
- Add
social_auth_backend_epita.backend.EpitaOpenIdConnectto theAUTHENTICATION_BACKENDSof your Djangosettings.pyfile:
AUTHENTICATION_BACKENDS = (
"social_auth_backend_epita.backend.EpitaOpenIdConnect",
"django.contrib.auth.backends.ModelBackend",
)
- Add your OpenID client credentials to your Django
settings.pyfile:
SOCIAL_AUTH_EPITA_KEY = "..."
SOCIAL_AUTH_EPITA_SECRET = "..."
- Fill
SOCIAL_AUTH_EPITA_SCOPEwith the relevant scope names in your Djangosettings.pyfile:
SOCIAL_AUTH_EPITA_SCOPE = [
"email",
"epita",
]
Other frameworks
This backend only uses framework-agnostic functions and should work with any framework supported by python-social-auth. Be advised that it has only been tested with Django.
Pipeline functions
You may add the following functions to your social auth pipeline:
social_auth_backend_epita.pipeline.deny_old_users
This function prevents users with an updated username to sign in with their old identity.
social_auth_backend_epita.pipeline.merge_old_users
Merge old accounts into the new one when a username update is detected.
For now it is only possible to merge one old account into a new, not previously existing, account. This is achieved by updating the old account with the new username.
social_auth_backend_epita.pipeline.update_email
This function allows email updates to be processed since the default social-auth pipeline ignores the email claim for existing accounts.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file
social-auth-backend-epita-1.0.2.tar.gz.File metadata
File hashes
934b03f3122b8a82980b41f60514889869dd7d1160ad5dcbeb97ed8e940f18e7ee89ca87cbdac12b69636747fcb96b52b9f3d94a66b80d7040f2085cc24b7fbd958f2818d2a39dad2bbe54b76eb187ebSee more details on using hashes here.