some changes to auth and group api
This commit is contained in:
@@ -136,13 +136,14 @@ def oidc(redirect_url=None):
|
||||
return response
|
||||
|
||||
|
||||
@auth_api_bp.route('/refresh', methods=['POST'])
|
||||
@auth_api_bp.route('/refresh', methods=['GET'])
|
||||
@jwt_refresh_token_required
|
||||
def refresh():
|
||||
"""Refresh token endpoint. This will generate a new access token from
|
||||
the refresh token, but will mark that access token as non-fresh,
|
||||
as we do not actually verify a password in this endpoint."""
|
||||
current_user = get_jwt_identity()
|
||||
app.logger.info("Refreshing token for " + current_user)
|
||||
new_token = create_access_token(identity=current_user, fresh=False)
|
||||
ret = {'access_token': new_token}
|
||||
return jsonify(ret), 200
|
||||
|
||||
Reference in New Issue
Block a user