JetStream Authentication MiddleWare
Project description
JSA Auth Middleware is a python package built for integrating with JetStream across multiple micro-services, with the aim of handling authentication and Single-Sign-On while ensuring API security.
Quick start
Configure AUTH_BASE_URL in project settings pointing to the Authentication server without trailing slash
Add jsa_auth_middleware.JSAMiddleware to your MIDDLEWARE configuration in settings.py to validate authentication of all incoming requests:
MIDDLEWARE = [ ... 'jsa_auth_middleware.JSAMiddleware', ]
Import Query Response across application to define and process API response:
from jsa_auth_middleware.query_response import Response resp = Response() resp.failed() # on failure, using default failure status_code resp.message = '<<Some response message>>' resp.add_params('<<data_key>>', <<data_value>>) resp = Response() resp.passed() # on success, using default success status_code resp.message = '<<Some response message>>' resp.add_params('<<data_key>>', <<data_value>>) # Setting response status code resp.status_code = <<CustomStatusCode>>
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
Close
Hashes for jsa-auth-middleware-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c32140073bf0cef889e22029f063f07782d999f80064c5787d595c03605673d5 |
|
MD5 | c8a391bb2323b7dbd3904d47f12e1ef5 |
|
BLAKE2b-256 | dee8deb1eeced31483ac7903fa3ea541fe150150d897e167740c0c5de5211b24 |
Close
Hashes for jsa_auth_middleware-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cedefde9a59f2888e1d0ea8e3bb0b468734ad2afdd75141454429a18bed09b5 |
|
MD5 | eb8b812fc03f6e1c2ab1180105bda672 |
|
BLAKE2b-256 | 38ac6a5780df00e750512f657b5c915c6eb5fe9ef0dc41c4f97e3a7ddcae1694 |