keystone.py 文件源码

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

项目:galaxia 作者: WiproOpenSourcePractice 项目源码 文件源码
def validate_token(token):
    headers = {
        "Content-Type": 'application/json',
        'X-Auth-Token': token
    }
    keystone_token_validation_url = client.concatenate_url(
            CONF.gexporter.keystone_endpoint, tenants)
    try:
        resp = client.http_request("GET", keystone_token_validation_url,
                                   headers, None, None, None)
        if resp.status_code != 200:
            return False
        else:
            return True
    except Exception as ex:
        raise ex
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号