zoukankan      html  css  js  c++  java
  • 解决samlexception-inresponsetofield-of-the-response-doesnt-correspond-to-sent-mess

    sp在校验samlresponse 根据id在session中的samlrequestid 取出,两者进行对比,这里如果做idp-init的话 可以注释掉。

    1第一种方法 WebSSOProfileConsumerImpl 包名package org.springframework.security.saml.websso;

            // Verify response to field if present, set request if correct
            SAMLMessageStorage messageStorage = context.getMessageStorage();
            if (messageStorage != null && response.getInResponseTo() != null) {
                XMLObject xmlObject = messageStorage.retrieveMessage(response.getInResponseTo());
                if (xmlObject == null) {
                     //取消校验saml Request
                    //throw new SAMLException("InResponseToField of the Response doesn't correspond to sent message " + response.getInResponseTo());
                } else if (xmlObject instanceof AuthnRequest) {
                    request = (AuthnRequest) xmlObject;
                } else {
                    throw new SAMLException("Sent request was of different type than the expected AuthnRequest " + response.getInResponseTo());
                }
            }

    如果你一边使用域名,一边使用ip的话也会报这个错误,最好统一使用域名,或者统一使用ip地址。

  • 相关阅读:
    Oracle求连续的年份
    关于Extjs MVC模式上传文件的简单方式
    后进先出 stack、 先进先出Queue
    python的文件操作
    C#的接口
    C#的访问级别
    C#的继承
    SQL查询语句 常用示例
    SQL Server数据库常用函数
    数据库建立和连接
  • 原文地址:https://www.cnblogs.com/chenyangwang/p/10272007.html
Copyright © 2011-2022 走看看