add more mail / ui stuff
This commit is contained in:
parent
18863bee7f
commit
2b86fa89c4
9 changed files with 86 additions and 3006 deletions
|
@ -49,7 +49,6 @@ def introspect() -> ResponseReturnValue:
|
|||
return jsonify({}), 500
|
||||
token_info = resp.json()
|
||||
#token_info = introspect_o_auth_2_token.sync(_client=hydra_service, token=token)
|
||||
logger.error(f'debug hydra: {token_info}')
|
||||
|
||||
if not token_info['active']:
|
||||
return jsonify({'active': False})
|
||||
|
@ -59,3 +58,20 @@ def introspect() -> ResponseReturnValue:
|
|||
|
||||
return jsonify(token_info)
|
||||
|
||||
|
||||
@api_views.route('email/login', methods=['POST'])
|
||||
def email_login() -> ResponseReturnValue:
|
||||
logger.error(f'{request}')
|
||||
logger.error(f'{request.headers}')
|
||||
if not request.is_json:
|
||||
return {}, 400
|
||||
req_payload = request.get_json()
|
||||
logger.error(f'{req_payload}')
|
||||
password = req_payload["password"]
|
||||
username = req_payload["username"]
|
||||
|
||||
if password == "123456":
|
||||
return jsonify({})
|
||||
|
||||
return jsonify({}), 403
|
||||
|
||||
|
|
|
@ -227,3 +227,15 @@ def sign_up_submit():
|
|||
'status': 'error',
|
||||
'errors': form.errors
|
||||
})
|
||||
|
||||
|
||||
@auth_views.route("/oob", methods=["GET"])
|
||||
def oob_token():
|
||||
|
||||
token_info = {
|
||||
'code': request.args.get('code', default="", type=str),
|
||||
'scope': request.args.get('scope', default="", type=str),
|
||||
'state': request.args.get('state', default="", type=str),
|
||||
}
|
||||
|
||||
return render_template('auth/oob.html.j2', token_info=token_info)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue