当前位置: 首页>>代码示例>>Python>>正文


Python ClaimsClient.userclaims_endpoint方法代码示例

本文整理汇总了Python中oic.oic.claims_provider.ClaimsClient.userclaims_endpoint方法的典型用法代码示例。如果您正苦于以下问题:Python ClaimsClient.userclaims_endpoint方法的具体用法?Python ClaimsClient.userclaims_endpoint怎么用?Python ClaimsClient.userclaims_endpoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oic.oic.claims_provider.ClaimsClient的用法示例。


在下文中一共展示了ClaimsClient.userclaims_endpoint方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_c2

# 需要导入模块: from oic.oic.claims_provider import ClaimsClient [as 别名]
# 或者: from oic.oic.claims_provider.ClaimsClient import userclaims_endpoint [as 别名]
def test_c2():
    cc = ClaimsClient(client_id="client_1")
    cc.client_secret = "hemlig"
    cc.userclaims_endpoint = "https://example.com/claims"
    request = UserClaimsRequest
    method = "POST"
    request_args = {"sub": "norah", "claims_names": ["gender", "birthdate"]}

    cc.request_info(request, method=method, request_args=request_args)
开发者ID:HaToHo,项目名称:pyoidc,代码行数:11,代码来源:test_x_claims.py

示例2: init_claims_clients

# 需要导入模块: from oic.oic.claims_provider import ClaimsClient [as 别名]
# 或者: from oic.oic.claims_provider.ClaimsClient import userclaims_endpoint [as 别名]
    def init_claims_clients(self, client_info):
        res = {}
        if client_info is None:
            return res

        for cid, specs in client_info.items():
            if "dynamic" in specs:
                cc = self.dynamic_init_claims_client(cid, specs["client"])
            else:
                cc = ClaimsClient(client_id=specs["client_id"])
                cc.client_secret = specs["client_secret"]
                try:
                    cc.keyjar.add(specs["client_id"], specs["jwks_uri"])
                except KeyError:
                    pass
                cc.userclaims_endpoint = specs["userclaims_endpoint"]
            res[cid] = cc
        return res
开发者ID:Omosofe,项目名称:pyoidc,代码行数:20,代码来源:distaggr.py

示例3: init_claims_clients

# 需要导入模块: from oic.oic.claims_provider import ClaimsClient [as 别名]
# 或者: from oic.oic.claims_provider.ClaimsClient import userclaims_endpoint [as 别名]
def init_claims_clients(client_info):
    res = {}
    for cid, specs in client_info.items():
        if "dynamic" in specs:
            cc = dynamic_init_claims_client(cid, args)
        else:
            cc = ClaimsClient(client_id=specs["client_id"])
            cc.client_secret = specs["client_secret"]
            try:
                cc.keystore.load_x509_cert(specs["x509_url"], "ver", cid)
            except KeyError:
                pass
            try:
                cc.keystore.load_jwk(specs["jwk_url"], "ver", cid)
            except KeyError:
                pass
            cc.userclaims_endpoint = specs["userclaims_endpoint"]
        res[cid] = cc
    return res
开发者ID:imsoftware,项目名称:pyoidc,代码行数:21,代码来源:oc3_server.py

示例4: init_claims_clients

# 需要导入模块: from oic.oic.claims_provider import ClaimsClient [as 别名]
# 或者: from oic.oic.claims_provider.ClaimsClient import userclaims_endpoint [as 别名]
def init_claims_clients(client_info):
    res = {}
    for cid, specs in client_info.items():
        if "dynamic" in specs:
            cc = dynamic_init_claims_client(cid, args)
        else:
            cc = ClaimsClient(client_id=specs["client_id"])
            cc.client_secret=specs["client_secret"]
            _req = cc.keystore.crypt.http_request
            _s2k = cc.keystore.spec2key
            try:
                for typ, key in load_x509_cert(_req, specs["x509_url"], _s2k):
                    cc.keystore.set_verify_key(key, typ, cid)
            except KeyError:
                pass
            try:
                for typ, key in load_jwk(_req, specs["jwk_url"], _s2k):
                    cc.keystore.set_verify_key(key, typ, cid)
            except KeyError:
                pass
            cc.userclaims_endpoint = specs["userclaims_endpoint"]
        res[cid] = cc
    return res
开发者ID:dash-dash,项目名称:pyoidc,代码行数:25,代码来源:broken_server.py


注:本文中的oic.oic.claims_provider.ClaimsClient.userclaims_endpoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。