Django middleware for Decode Auth
Project description
Decode Server Django
A middleware for Django for authenticating requests from Decode Auth Server.
Installing
Install using pip:
pip install decode_server_django
A simple example
To integrate your Django app with Decode Auth you need to set the Decode public key and register the middleware with the app.
# in settings.py of your app add the public key
DECODE_PUBLIC_KEY = """-----BEGIN RSA PUBLIC KEY-----
...REDACTED...
-----END RSA PUBLIC KEY-----"""
# And register the middleware
MIDDLEWARE = [
'decode_server_django.middleware.DecodeAuthMiddleware',
...
]
Now all the routes will be protected by the middleware and only Decode Auth will be able to call them.
Developing
To install Decode Server Flask, alogn with the tools you need to develop and run tests, run the following in your virtualenv:
pip install -e .[dev]
Pushing updates
# First build the redistributable
python setup.py bdist_wheel sdist
# and then push it to pypi.org
twine upload dist/*
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
Built Distribution
File details
Details for the file decode_server_django-1.0.0.tar.gz
.
File metadata
- Download URL: decode_server_django-1.0.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 693d75e26be4ced9e52ea84058a8d3dc452cf8b349e5080176dd85b3f2a4b1b6 |
|
MD5 | 5c24b1a66ea5c09e1fed7904d3bb95f1 |
|
BLAKE2b-256 | 4e05815c9801f93a0ab1ee446011ea54b90843d85f0f6d930d7a5afd2b0423c1 |
File details
Details for the file decode_server_django-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: decode_server_django-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7704719a489288fe636861f5d937a2a76f848fd98e384626cf2ffff1833ef41 |
|
MD5 | d4334aacb61f8606ca1626eea3851f2e |
|
BLAKE2b-256 | a22a08a2dd86321ae76e84b7e0183faa1e9167a33f4ebc8267b3179ec8097a90 |