No project description provided
Project description
djang-aws-alb-idp-auth
features
- verify jwt
- extract user claims
setup
middleware
Put django_aws_alb_idp_auth.middleware.alb_idp_auth_middleware
and django.contrib.auth.middleware.RemoteUserMiddleware
after AuthenticationMiddleware.
MIDDLEWARE = [
...
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_aws_alb_idp_auth.middleware.alb_idp_auth_middleware',
'django.contrib.auth.middleware.RemoteUserMiddleware',
...
]
auth backend
You may use RemoteUserBackend as Authentication Backend to create accessing user model.
AUTHENTICATION_BACKENDS = [
'django.contrib.auth.backends.RemoteUserBackend',
# 'django_aws_alb_idp_auth.backends.CreateUsperUserBackend',
]
django_aws_alb_idp_auth.backends.CreateUsperUserBackend
is very convenient RemoteUserBackend that creates superuser.
accessing user claims
You can get user claims from request.META["django_aws_alb_idp_auth.middleware.user_claims"]
.
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
Close
Hashes for django-aws-alb-idp-auth-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1e70ea2a2230f2030dd6292ba11a88b7e229fcc30119dce542dfacbdcdefdfe |
|
MD5 | ee6dbd7d0b5a6c7751f575c98e184a64 |
|
BLAKE2b-256 | 11439eda83f56ebfd18c027f54a6fdef43530f11662d201e156c359be535a336 |
Close
Hashes for django_aws_alb_idp_auth-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4338b71d2d58bf0a649473406523975cc3be6be606fc9ac727c3cce2250cd328 |
|
MD5 | 091910d8bb95a651dc3f85f2ce2b5403 |
|
BLAKE2b-256 | 61a43ed639b1faad42aa8bff1b254cc6cac97ae64cdd82b1237f7d7046739dd0 |