mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
First pass at implementing API authentication using new JWT tokens
- NOTE - this does not manage secrets. There is only one URL and there is no functionality implemented - prior to rolling out we need to store secrets properly Uses the JWT libraries in [https://github.com/alphagov/notifications-python-client](https://github.com/alphagov/notifications-python-client) - Tokens are checked on every request and will be rejected if token is invalid as per the rules in the python clients.
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import os
|
||||
|
||||
from flask._compat import string_types
|
||||
from flask import Flask
|
||||
from flask import Flask, _request_ctx_stack
|
||||
from werkzeug.local import LocalProxy
|
||||
from config import configs
|
||||
|
||||
api_user = LocalProxy(lambda: _request_ctx_stack.top.api_user)
|
||||
|
||||
|
||||
def create_app(config_name):
|
||||
application = Flask(__name__)
|
||||
|
||||
Reference in New Issue
Block a user