foo
This commit is contained in:
parent
44e4e4eb42
commit
39a4adab92
4 changed files with 27 additions and 6 deletions
|
|
@ -8,14 +8,12 @@ from areas.apps import App, AppRole
|
|||
from config import *
|
||||
from helpers import HydraOauth, BadRequest, KratosApi
|
||||
|
||||
|
||||
@api_v1.route("/login", methods=["POST"])
|
||||
@cross_origin()
|
||||
def login():
|
||||
authorization_url = HydraOauth.authorize()
|
||||
return jsonify({"authorizationUrl": authorization_url})
|
||||
|
||||
|
||||
@api_v1.route("/hydra/callback")
|
||||
@cross_origin()
|
||||
def hydra_callback():
|
||||
|
|
|
|||
|
|
@ -1,14 +1,23 @@
|
|||
from multiprocessing import current_process
|
||||
from flask import jsonify, request
|
||||
from flask_jwt_extended import create_access_token
|
||||
from flask_jwt_extended import create_access_token, jwt_required
|
||||
from flask_cors import cross_origin
|
||||
from datetime import timedelta
|
||||
from helpers.authentik_api import AuthentikApi
|
||||
|
||||
from areas import api_v1
|
||||
from config import *
|
||||
from helpers import LITOauth, BadRequest
|
||||
|
||||
|
||||
@api_v1.route("/logout", methods=["POST"])
|
||||
@cross_origin()
|
||||
@jwt_required()
|
||||
def logout():
|
||||
res = AuthentikApi.post("/flows/executor/default-invalidation-flow/")
|
||||
print(res)
|
||||
return jsonify({})
|
||||
|
||||
@api_v1.route("/login", methods=["POST"])
|
||||
@cross_origin()
|
||||
def login():
|
||||
|
|
|
|||
Reference in a new issue