app.py 文件源码

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

项目:schul_cloud_resources_server_tests 作者: schul-cloud 项目源码 文件源码
def get_api_key():
    """Return the api key or None."""
    header = request.headers.get('Authorization')
    if not header: return
    try:
        method, data = header.split(None, 1)
        if method.lower() != 'api-key': return
        return touni(base64.b64decode(tob(data[4:])))
    except (ValueError, TypeError):
        abort(401, HEADER_ERROR)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号