Skip to main content

No project description provided

Project description

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

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

django_aws_alb_idp_auth-0.1.3.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

django_aws_alb_idp_auth-0.1.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file django_aws_alb_idp_auth-0.1.3.tar.gz.

File metadata

  • Download URL: django_aws_alb_idp_auth-0.1.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/21.6.0

File hashes

Hashes for django_aws_alb_idp_auth-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bbf1b711437cc9f545a63a4879faac036c415d0383ec6eefc8f73b13bde72792
MD5 c2ac00b43db67fe3593baa3ddcb714fa
BLAKE2b-256 0615e1192291689e0cc5d3e9be53dd9e4be1256044516457dc433648271c5a6f

See more details on using hashes here.

File details

Details for the file django_aws_alb_idp_auth-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_aws_alb_idp_auth-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f97f2e94896423ad23b5e2a3cde965fcfd79d591c0384d405de173123993d168
MD5 e4028d828a410eac3e7a2035a4d736dc
BLAKE2b-256 bc86f614b533089d3f8f9aea867211312f4768ab89f71fa3914972e3c600cd11

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page