added toJSON func

This commit is contained in:
2019-04-02 16:58:59 +02:00
parent 8cf8632c8c
commit cfa12717e0
2 changed files with 17 additions and 2 deletions

View File

@@ -117,7 +117,8 @@ def oidc():
user = create_or_retrieve_user_from_userinfo(flask.session['userinfo'])
return jsonify(user.to_dict())
#return jsonify(user.to_dict())
return user.toJSON()
if user is None:
return "Could not authenticate: could not find or create user.", 401
if current_app.config.get("AUTH_RETURN_EXTERNAL_JWT", False):