尝试访问/验证时FlaskJWT得到404

2024-09-27 07:23:24 发布

您现在位置:Python中文网/ 问答频道 /正文

我的函数如下所示:

# 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.

有什么问题吗?在


Tags: andnoneidurlgetreturndefusername

热门问题