Metadata-Version: 2.1
Name: decode-server-django
Version: 0.0.1
Summary: Django middleware for Decode Auth
Home-page: https://github.com/usedecode/decode_server
Author: Davor Badrov
Author-email: django@decodeauth.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: Django (>=3.0)
Requires-Dist: python-jose (~=3.2)
Provides-Extra: dev
Requires-Dist: pytest (>=3.7) ; extra == 'dev'
Requires-Dist: twine (>=3.2) ; extra == 'dev'

# Decode Server Django

A middleware for Django for authenticating requests from [Decode Auth Server](https://decodeauth.com/).


## Installing

Install using pip:

```sh
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.

```python
# 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 = [
    'decodeauth.middleware.DecodeAuthMiddleware',
    ...
]

```


## Developing

To install Decode Server Django, alogn with the tools you need to develop and run tests, run the following in your virtualenv:

```sh
pip install -e .[dev]
```


