Skip to main content

wsgi-basic-auth

Really simple wsgi middleware to provide basic http auth compatible with Amazon ELB. It is intented to work with environment variables within a docker context.

In Django for example edit the wsgi.py file and add the following to the end of the file.

from wsgi_basic_auth import BasicAuth
application = BasicAuth(application)

Now run docker with the env variable WSGI_AUTH_CREDENTIALS=foo:bar and you have to authenticate with username foo and password bar. Multiple credentials are separated with a | (pipe) character.

To exclude specific paths for healthchecks (e.g. the Amazon ELB healthchecks) specifcy the environment variable WSGI_AUTH_EXCLUDE_PATHS=/api/healthchecks. Here multiple paths can be separated with the ; char.

Metadata

Release files for wsgi-basic-auth 0.0.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 wsgi-basic-auth 0.0.3
File Size Uploaded
wsgi-basic-auth-0.0.3.tar.gz 2.2 kB Details

Release files / wsgi-basic-auth-0.0.3.tar.gz

Download URL wsgi-basic-auth-0.0.3.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
702eb722727b4b0789c671a1249b2428898f69448b68aa7ac22604964bf92a11
BLAKE2b-256 checksum
How to use checksums
825bcc783426eea52808c576be74a430d428144376c19989db1da1a1e5549417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

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