【问题标题】:SAML Exception Intended destination endpoint did not matchSAML 异常 预期目标端点不匹配
【发布时间】:2012-08-09 23:25:10
【问题描述】:

客户端尝试使用 SAML 单点登录到我们的应用,而我们的应用抛出 followimg 异常

org.opensaml.xml.security.SecurityException:SAML 消息预期目标端点与接收端点不匹配。

【问题讨论】:

    标签: saml-2.0


    【解决方案1】:

    此异常的原因是断言客户端发送给我们的 Response 元素中缺少 Destination 属性。响应需要类似于:

    <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="_a8590dae-831c-4142-9fc9-a15f60e972a0" Version="2.0" IssueInstant="2012-02-22T17:08:57Z" Destination="https://client.ourapp.com/product/AssertionConsumer" xmlns="urn:oasis:names:tc:SAML:2.0:protocol">
    

    包含我们的断言消费者 url 所需的 Destination 属性。

    【讨论】: