models.py 文件源码

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

项目:2017-rapdev-backend 作者: rit-sse 项目源码 文件源码
def verify_auth_token(token):
        """Get the user from a JWT token."""
        try:
            decoded = jwt.decode(token, secret, algorithms=['HS256'])
        except jwt.DecodeError:
            return None
        user = User.query.get(decoded['id'])
        return user
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号