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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a73c3485cb9e1a3e064ef54ec0baad8e2f463c2f27976923db8742044af3bce9 |
|
MD5 | 8fbffd280d7d865314149369812a7d43 |
|
BLAKE2b-256 | d5c64f057bd6ae408e5e65d18d06d6ef4371996084c801111a9635a6cfc286dd |
Close
Hashes for django_admin_keycloak-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5139183588888b3642c682b34ff346c6a46094d1c352c3597dd1120c1e809f8c |
|
MD5 | a02054c442e9b55b49315e7ad353cee4 |
|
BLAKE2b-256 | e3d5ca656217468c61bdcb5323935fb447d9055feb336deef410c3a8985e9fba |