authentication_service.py 文件源码

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

项目:tasking-manager 作者: hotosm 项目源码 文件源码
def generate_session_token_for_user(osm_id: int):
        """
        Generates a unique token with the osm_id and current time embedded within it
        :param osm_id: OSM ID of the user authenticating
        :return: Token
        """
        entropy = current_app.secret_key if current_app.secret_key else 'un1testingmode'

        serializer = URLSafeTimedSerializer(entropy)
        return serializer.dumps(osm_id)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号