Skip to main content

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

decode_server_django-1.0.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

decode_server_django-1.0.0-py3-none-any.whl (3.9 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