django-allauth-d120
django-allauth-d120 is a provider for allauth to integrate d120 accounts into django projects. It therefor provides a wrapper around the allauth OAuth 2.0 provider and connects it with the keycloak OAuth 2.0 endpoint. The app allows to synchronize the groups of a user from keycloak to your django project.
Installation
- Install django-allauth-d120 with pip e.g.
pip install django-allauth django-allauth-d120 - Add the following apps to the installed
INSTALLED_APPSin thesettings.py:
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth_d120_provider', - Configure the Authentication backends in the
settings.py:
AUTHENTICATION_BACKENDS = (
# Needed to login by username in Django admin, regardless of `allauth`
'django.contrib.auth.backends.ModelBackend',
# `allauth` specific authentication methods, such as login by e-mail
'allauth.account.auth_backends.AuthenticationBackend',
)
- Configure allauth to disable email verification, account sing up outside the sso and
account sign up via the sso in the
settings.py:
ACCOUNT_EMAIL_VERIFICATION = "none"
ACCOUNT_ADAPTER = "allauth_d120_provider.account_adapter.DisableSignUpAdapter"
SOCIALACCOUNT_ADAPTER = "allauth_d120_provider.account_adapter.SocialAccountAdapter"
- Run
manage.py migrateto create sync the database with the newly installed apps - Login into the Django Admin webinterface to configure the website object. Therefore go to site section and
select the site model e.g. the url ends on
admin/sites/site/whereadmin/is the root path of Django Admin in your project. Make sure the domain matches the domain your project is running on. - Within Django Admin go to the Social Accounts section and select the Social applications model e.g. the url
ends on
admin/socialaccount/socialapp/whereadmin/is the root path of Django Admin in your project. Add a new instance which usesD120 OAuth 2.0as provider. Please ask fss@ for a Client id and the related Secret Key. - Have a look at the instructions to install allauth. There might be steps necessary steps that are not mentioned in this instruction.
Group Synchronization
You can create a group synchronization by adding instances of the groupsync Model via Django Admin. Therefor select the Group Synchronization model in the D120 Autentication Provider section. The groups synchronize when the user logs into the project.
Metadata
Release files for django-allauth-d120 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-allauth-d120-0.0.8.tar.gz | 5.0 kB | Without provenance | Details for django-allauth-d120-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_allauth_d120-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for django_allauth_d120-0.0.8-py3-none-any.whl |
Total release size: 24.6 kB
Release files / django-allauth-d120-0.0.8.tar.gz
| Download URL | django-allauth-d120-0.0.8.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8646a463e9f2ea6b62da7cbb6cc5ff8bd7d6a271a24db756e0f47eca69736d30
|
|
BLAKE2b-256 checksum How to use checksums |
671c7a0bb5f6733fbddd4d3f36c3a1c68122a7ff00a23c009a8f2a1111cd9a1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
|
Release files / django_allauth_d120-0.0.8-py3-none-any.whl
| Download URL | django_allauth_d120-0.0.8-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0537925a69c9e5b6fde3786542e6d75bebea872fca6ce5dac6e9ada6f0d2951b
|
|
BLAKE2b-256 checksum How to use checksums |
c599818183be12639f220c3f0526da61792a65fe2ef6fef623cf86f9b03213e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
|
Security for django-allauth-d120 0.0.8
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.