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地址。

解决samlexception-inresponsetofield-of-the-response-doesnt-correspond-to-sent-mess的更多相关文章

  1. 解决Windows jmeter Non HTTP response message: Address already in use: connect 错误(转载)

    jMeter报错: Response code: Non HTTP response code: java.net.BindExceptionResponse message: Non HTTP re ...

  2. Web jsp开发学习——终极解决jsp中request和response中文乱码的问题(加个过滤器)

    中文乱码真的很烦人的.而且每次都要写,可麻烦了,而且有时候写了还不一定管用,所以我们可以试试过滤器 1.每个jsp头上当然要写上utf8啦 <%@ page language="jav ...

  3. 项目依赖模块解决、二次封装Response、后台数据库配置、user模块user表设计、前台创建及配置

    今日内容概要 二次封装Response 后台数据库配置 user模块user表设计 前台创建及配置 内容详细 补充--项目依赖模块 # 导出项目依赖模块和安装项目依赖模块 第三方模块--->导出 ...

  4. Servlet的response输出到页面时乱码的解决方法

    package com.mhb; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.Servle ...

  5. java web 中有效解决中文乱码问题-pageEncoding与charset区别, response和request的setCharacterEncoding 区别

    这里先写几个大家容易搞混的编码设置代码: 在jsp代码中的头部往往有这两行代码 pageEncoding是jsp文件本身的编码contentType的charset是指服务器发送给客户端时的内容编码J ...

  6. 用file上传文件时,浏览器返回值总是自动添加<pre>的解决办法

    在返回的JSon字符串里面总是莫名其妙的添加了<pre>标签,例如返回内容为"ok",在浏览器里面就变成了"<pre style="word- ...

  7. 解决javax.imageio.IIOException: Can't create output stream!

    解决javax.imageio.IIOException: Can't create output stream! javax.imageio.ImageIO.write(image, "J ...

  8. 解决Volley请求网络数据返回的数据乱码

    本人可参考http://tieba.baidu.com/p/4039693566 以往一般我们如下写就可以了 StringRequest request=new StringRequest(url, ...

  9. asp.net webservice 返回json数据乱码解决方法

    [WebMethod] public void QueryRiskNotice(string phone) { try { var data = _riskNoticeDal.QueryRiskNot ...

随机推荐

  1. Java Blob类型和String类型相互转换

    1.String 转 Blob: String content = "Hello World!"; Blob blob = Hibernate.createBlob(content ...

  2. thinkphp5服务器部署遇到的问题

    candir() has been disabled for security reasons 解决办法: 进入到php的配置目录,编辑php.ini cd /usr/local/php/etcvi ...

  3. Python爬虫之定时抢购淘宝商品

    Python爬虫之定时抢购淘宝商品 import time from selenium import webdriver import datetime class Spider: def __ini ...

  4. scrapy 运行时报错 No module named _sqlite3

    新服务器上运行scrapy时报错 exceptions.ImportError: No module named _sqlite3 原因 由于新的环境缺少sqlite的依赖,编译python3是虽然不 ...

  5. python + excel 使用

    为了提高工作效率(偷懒),用python去解决. 工作需要,需要将excel文件转化为csv文件,要是手工的一个个去转换,每个sheet页不但有几十个字段,中间还夹杂着空格,然后按顺序转换成csv文件 ...

  6. python snippets

    1.Find memory used by an object import sys 2.Combine a list of strings into a single string strings ...

  7. C# WinFrom自适应

    1.在窗体的Project中建一个自适应的类. 2.类的代码如下 public class AutoSizeForm { //(1).声明结构,只记录窗体和其控件的初始位置和大小. public st ...

  8. 转载:网络编程 socket 可读可写条件判断

    转自:http://blog.csdn.net/majianfei1023/article/details/45788591 要了解socket可读可写条件,我们先了解几个概念:1.接收缓存区低水位标 ...

  9. app 进入后台进行模糊处理

    金融类app防止信息在后台中被一些恶意截屏软件进行截屏,对进入后台的app做模糊处理 - (void)applicationWillResignActive:(UIApplication *)appl ...

  10. Linux 软件的下载安装

    一.Linux系统安装软件的方式有两种: 1.通过 Linux 资源服务(类似于APP Shop)直接安装 2.下载tar包,解压安装.   二.Linux 资源服务安装软件 1.提示:一般安装一个软 ...