Started implementing username and password check

This commit is contained in:
cami 2021-07-22 02:41:24 +02:00
parent e7407fd40b
commit 770e3e0285
2 changed files with 21 additions and 0 deletions

View file

@ -119,6 +119,14 @@ def refresh():
return ret, 200
@app.route('/api/username', methods=['GET'])
@flask_praetorian.auth_required
def get_username():
user = flask_praetorian.current_user().username
ret = {'username': user}
return user, 200
@app.route('/api/protected')
@flask_praetorian.auth_required
def protected():