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