这是我的功能看起来怎么样:瓶智威汤逊 - 试图访问时,获得404/AUTH
# authenticate a user
def authenticate(username, password):
userAuth = username_mapping.get(username, None)
if userAuth and userAuth.password == password:
return userAuth
# identify user from a token
def identity(payload):
user_id = payload['identity']
return userid_mapping.get(user_id, None)
但是,当我尝试张贴一些JSON数据给它,它给了我下面的错误:
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
可能是什么问题?
你是怎么定义'@ app.route'和你用什么网址来做这个帖子的? –
我把'@jwt_required()'放在我的'get'方法上面,并且使用url http:// 127.0.0.1/auth' – gambit2017