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

Uploaded Source

Built Distribution

django_aws_alb_idp_auth-0.1.1-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.1.tar.gz.

File metadata

  • Download URL: django-aws-alb-idp-auth-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 2d9c67438d13035982cae6388bba74d6d50ecd196e73e77dcd20f662a64fabb5
MD5 06f82e8f8ed55207ef40b7d2822534b3
BLAKE2b-256 d515648bb741b1ee686887a40d227bea4397a2480e5f5433ded57dba23117633

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_aws_alb_idp_auth-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 efde768081dc59d601bc14bf45bf845f861454f2874e4031dd064720b2604f99
MD5 e8540905a85c4022bce1720a1562c62e
BLAKE2b-256 b64ff382235fa1dca2ac1e7f007ea9816d2d00587a7f805a27afa633611f65aa

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