auth.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:linkero 作者: ingran 项目源码 文件源码
def verify_password(username_or_token, password):
    # first try to authenticate by token
    user = User.verify_auth_token(username_or_token)
    if not user:
        # try to authenticate with username/password
        user = User.query.filter_by(username=username_or_token).first()
        if not user or not user.verify_password(password):
            return False
    g.user = user
    return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号