Skip to main content

Allauth provider for the D120 SSO

Project description

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

  1. Install django-allauth-d120 with pip e.g. pip install django-allauth django-allauth-d120
  2. Add the following apps to the installed INSTALLED_APPS in the settings.py:
    'django.contrib.sites',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth_d120_provider',
  3. 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',
)
  1. 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"
  1. Run manage.py migrate to create sync the database with the newly installed apps
  2. 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/ where admin/ is the root path of Django Admin in your project. Make sure the domain matches the domain your project is running on.
  3. Within Django Admin go to the Social Accounts section and select the Social applications model e.g. the url ends on admin/socialaccount/socialapp/ where admin/ is the root path of Django Admin in your project. Add a new instance which uses D120 OAuth 2.0 as provider. Please ask fss@ for a Client id and the related Secret Key.
  4. 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.

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

django-allauth-d120-0.0.8.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

django_allauth_d120-0.0.8-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file django-allauth-d120-0.0.8.tar.gz.

File metadata

  • Download URL: django-allauth-d120-0.0.8.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for django-allauth-d120-0.0.8.tar.gz
Algorithm Hash digest
SHA256 8646a463e9f2ea6b62da7cbb6cc5ff8bd7d6a271a24db756e0f47eca69736d30
MD5 755510060109e3c81d956cfcb8fb8b01
BLAKE2b-256 671c7a0bb5f6733fbddd4d3f36c3a1c68122a7ff00a23c009a8f2a1111cd9a1b

See more details on using hashes here.

File details

Details for the file django_allauth_d120-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: django_allauth_d120-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for django_allauth_d120-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0537925a69c9e5b6fde3786542e6d75bebea872fca6ce5dac6e9ada6f0d2951b
MD5 137e73dfaf6e94c11188de63990e2b50
BLAKE2b-256 c599818183be12639f220c3f0526da61792a65fe2ef6fef623cf86f9b03213e1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page