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.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

django_aws_alb_idp_auth-0.1.2-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.2.tar.gz.

File metadata

  • Download URL: django-aws-alb-idp-auth-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.0

File hashes

Hashes for django-aws-alb-idp-auth-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a1e70ea2a2230f2030dd6292ba11a88b7e229fcc30119dce542dfacbdcdefdfe
MD5 ee6dbd7d0b5a6c7751f575c98e184a64
BLAKE2b-256 11439eda83f56ebfd18c027f54a6fdef43530f11662d201e156c359be535a336

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_aws_alb_idp_auth-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.0

File hashes

Hashes for django_aws_alb_idp_auth-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4338b71d2d58bf0a649473406523975cc3be6be606fc9ac727c3cce2250cd328
MD5 091910d8bb95a651dc3f85f2ce2b5403
BLAKE2b-256 61a43ed639b1faad42aa8bff1b254cc6cac97ae64cdd82b1237f7d7046739dd0

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