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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d9c67438d13035982cae6388bba74d6d50ecd196e73e77dcd20f662a64fabb5 |
|
MD5 | 06f82e8f8ed55207ef40b7d2822534b3 |
|
BLAKE2b-256 | d515648bb741b1ee686887a40d227bea4397a2480e5f5433ded57dba23117633 |
Close
Hashes for django_aws_alb_idp_auth-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efde768081dc59d601bc14bf45bf845f861454f2874e4031dd064720b2604f99 |
|
MD5 | e8540905a85c4022bce1720a1562c62e |
|
BLAKE2b-256 | b64ff382235fa1dca2ac1e7f007ea9816d2d00587a7f805a27afa633611f65aa |