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 hashes)

Uploaded Source

Built Distribution

django_aws_alb_idp_auth-0.1.1-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

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