https://github.com/norakgithub/django-express-gateway
Integrating Django with Express Gateway
https://github.com/norakgithub/django-express-gateway
Last synced: about 1 year ago
JSON representation
Integrating Django with Express Gateway
- Host: GitHub
- URL: https://github.com/norakgithub/django-express-gateway
- Owner: NorakGithub
- License: mit
- Created: 2018-08-01T06:36:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T04:14:29.000Z (almost 8 years ago)
- Last Synced: 2025-05-08T21:44:08.017Z (about 1 year ago)
- Language: Python
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
===========================
Express Gateway With Django
===========================
Integrating Django with Express Gateway
------------
Requirements
------------
- Python 3 or later
- Django 2 or later
- Django Rest Framework 3.7 or later
- Requests 2.19 or later
------------
Installation
------------
Install with pip
.. code-block:: bash
$ pip install django_express_gateway
---------------
Getting Started
---------------
Add `express_gateway` to your `INSTALLED_APPS`
.. code-block:: python
INSTALLED_APPS = [
...
'express_gateway',
]
Add authentication to DRF default authentication settings
.. code-block:: python
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'express_gateway.authentications.AuthUserAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
),
...
}
Finally add the configuration for Centralize Authentication System.
.. code-block:: python
# Config data should get from environment variable
EXPRESS_GATEWAY = {
'URL': 'https://mycas-server.com',
'API_KEY': 'testingApiKey',
'ENDPOINTS': {
'register': '/auth/user/
'token': '/auth/token/',
}
}