def post(self): # get the post data post_data = request.json resp = Authentication.login_user(data=post_data) if resp[1] != 200: return abort(403, resp[0]) else: return resp
def post(self): # get the post data post_data = request.json resp = Authentication.login_user(data=post_data) if resp[1] != 200: return resp else: access_token = create_access_token(identity=resp[0]['username']) refresh_token = create_refresh_token(identity=resp[0]['username']) resp[0]['access_token'] = access_token resp[0]['refresh_token'] = refresh_token return resp
def post(self): # get the post data post_data = request.json return Authentication.login_user(data=post_data)