Skip to main content

djang-aws-alb-idp-auth

python test

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"].

Release files for django-aws-alb-idp-auth 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-aws-alb-idp-auth 0.1.3
File Size Uploaded
django_aws_alb_idp_auth-0.1.3.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-aws-alb-idp-auth 0.1.3
File Interpreter ABI Platform
django_aws_alb_idp_auth-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / django_aws_alb_idp_auth-0.1.3.tar.gz

Download URL django_aws_alb_idp_auth-0.1.3.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bbf1b711437cc9f545a63a4879faac036c415d0383ec6eefc8f73b13bde72792
BLAKE2b-256 checksum
How to use checksums
0615e1192291689e0cc5d3e9be53dd9e4be1256044516457dc433648271c5a6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Darwin/21.6.0

Release files / django_aws_alb_idp_auth-0.1.3-py3-none-any.whl

Download URL django_aws_alb_idp_auth-0.1.3-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f97f2e94896423ad23b5e2a3cde965fcfd79d591c0384d405de173123993d168
BLAKE2b-256 checksum
How to use checksums
bc86f614b533089d3f8f9aea867211312f4768ab89f71fa3914972e3c600cd11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Darwin/21.6.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page