slack_helper.py 文件源码

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

项目:chatops_slack 作者: DennyZhang 项目源码 文件源码
def verify_slack_token(http_method, allowed_token_list):
    token = ''
    if http_method == 'GET':
        token = request.args.get('token', '')
    elif http_method == 'POST':
        token = request.values['token']
    else:
        raise Exception("Error: unsupported http_method(%s)" % (http_method))

    if token not in allowed_token_list:
        content = "Error: invalid token(%s)" % (token)
        raise Exception(content)
    return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号