Implemented initial communication with Kratos
This commit is contained in:
parent
2c120886e8
commit
86412a114e
4 changed files with 14 additions and 1 deletions
8
app.py
8
app.py
|
@ -1,6 +1,7 @@
|
|||
from flask import Flask, jsonify
|
||||
from flask_jwt_extended import JWTManager
|
||||
from flask_cors import CORS, cross_origin
|
||||
from flask_cors import CORS
|
||||
import requests
|
||||
|
||||
from config import *
|
||||
|
||||
|
@ -25,3 +26,8 @@ def expired_token_callback(*args):
|
|||
@app.route('/')
|
||||
def index():
|
||||
return 'Open App Stack API v1.0'
|
||||
|
||||
@app.route('/hello')
|
||||
def hello():
|
||||
requests.get('{}/health/ready'.format(KRATOS_URL))
|
||||
return 'Open App Stack API v1.0'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||
KRATOS_URL = os.environ.get('KRATOS_URL')
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
certifi==2021.10.8
|
||||
cffi==1.14.6
|
||||
charset-normalizer==2.0.7
|
||||
click==8.0.1
|
||||
cryptography==3.4.7
|
||||
Flask==2.0.1
|
||||
Flask-Cors==3.0.10
|
||||
Flask-JWT-Extended==4.2.3
|
||||
gunicorn==20.1.0
|
||||
idna==3.3
|
||||
itsdangerous==2.0.1
|
||||
Jinja2==3.0.1
|
||||
MarkupSafe==2.0.1
|
||||
pycparser==2.20
|
||||
PyJWT==2.1.0
|
||||
requests==2.26.0
|
||||
six==1.16.0
|
||||
urllib3==1.26.7
|
||||
Werkzeug==2.0.1
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export FLASK_APP=app.py
|
||||
export FLASK_ENV=development
|
||||
export SECRET_KEY="e38hq!@0n64g@qe6)5csk41t=ljo2vllog(%k7njnm4b@kh42c"
|
||||
export KRATOS_URL="http://127.0.0.1:8000"
|
||||
flask run
|
||||
|
|
Loading…
Reference in a new issue