Django Admin Keycloak
Project description
django-admin-keycloak
Settings
# need for Backchannel logout
SESSION_ENGINE = 'django_admin_keycloak.session.db'
# or django_admin_keycloak.session.cache
# define static config or add provider later in admin management
KEYCLOAK_PROVIDERS = [
{
'slug': 'local', # internal django slug
'name': 'Local', # name on login form
'client_id': 'local_django',
'client_secret': 'SECRET',
'redirect_uri': '/admin', # redirect uri after login
'server_url': 'https://keycloak.example.ru',
'realm_name': 'django',
'role_staff_user': 'dev_staff', # role for staff users
'role_super_user': 'dev_super_user', # role for superusers
}
]
Add to urls.py
urlpatterns = [
# ...,
path('auth/', include('django_admin_keycloak.url')),
# ...
]
If you define static config, you must execute command for update providers.
python manage.py update_static_providers
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
Close
Hashes for django_admin_keycloak-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4794f37d4e504c9fa46507023c7f035fac5e74e29c6e07f633ce1a0696e0829 |
|
MD5 | 4ee60f50aa37735dbc0ac6339faf1002 |
|
BLAKE2b-256 | fe039f97c8f7a80c6c923119a8ed799922093c92a9bc84ff0c078e69c59032cd |
Close
Hashes for django_admin_keycloak-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9759f56e1c81d02cc893ca4b2e3e4a69df76a465d8631e3ffe50dfc9f29df94d |
|
MD5 | 4c33a805a3a075b0a516c103e9e741be |
|
BLAKE2b-256 | 31a17256943165c4e24ec127f337dd73aad9cb0f787a2855c67bb01311c77cd9 |