本文整理汇总了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)
示例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
示例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
示例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