auth.py 文件源码

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

项目:flask-quickstart 作者: keathmilligan 项目源码 文件源码
def authenticate(username, password):
    """
    Authenticate a username/password - this sample routine simply checks
    the username/password against a hard-coded table, a real-world
    implementation would authenticate users against a database or external
    service.
    """
    user = username_table.get(username, None)
    if user and safe_str_cmp(user.password.encode('utf-8'),
                             password.encode('utf-8')):
        return user
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号