本文整理汇总了Python中saml2.config.IdPConfig.assertion_consumer_services方法的典型用法代码示例。如果您正苦于以下问题:Python IdPConfig.assertion_consumer_services方法的具体用法?Python IdPConfig.assertion_consumer_services怎么用?Python IdPConfig.assertion_consumer_services使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类saml2.config.IdPConfig
的用法示例。
在下文中一共展示了IdPConfig.assertion_consumer_services方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_assertion_consumer_service
# 需要导入模块: from saml2.config import IdPConfig [as 别名]
# 或者: from saml2.config.IdPConfig import assertion_consumer_services [as 别名]
def test_assertion_consumer_service():
c = IdPConfig()
c.load_file("idp_conf")
c.context = "idp"
xml_src = open("inCommon-metadata.xml").read()
# A trick so outdated data is allowed
c.metadata.import_metadata(xml_src, "-")
print c.metadata.entity.keys()
entity_id = "https://www.zimride.com/shibboleth"
acs = c.assertion_consumer_services(entity_id)
assert len(acs) == 1
assert acs[0].location == 'https://www.zimride.com/Shibboleth.sso/SAML2/POST'