将CAS https认证的方式改为http
1.修改cas-servlet.xml
- <bean id="warnCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
- p:cookieSecure="true"
- p:cookieMaxAge="-1"
- p:cookieName="CASPRIVACY"
- p:cookiePath="/cas" />
- <bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
- p:cookieSecure="true "
- p:cookieMaxAge="-1"
- p:cookieName="CASTGC"
- p:cookiePath="/cas" />
<bean id="warnCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator" p:cookieSecure="true" p:cookieMaxAge="-1" p:cookieName="CASPRIVACY" p:cookiePath="/cas" /> <bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator" p:cookieSecure="true " p:cookieMaxAge="-1" p:cookieName="CASTGC" p:cookiePath="/cas" />
把上面连个bean中的p:cookieSecure="true "修改为p:cookieSecure="false"
2.修改deployerConfigContext.xml
- <bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
- p:httpClient-ref="httpClient" />
<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" p:httpClient-ref="httpClient" />
添加p:requireSecure="false"
3.修改casclient的客户端
修改客户端的https验证
(1).edu.yale.its.tp.cas.client.filter.edu.yale.its.tp.cas.client.filter
- if (! casValidate.startsWith("https://")){
- throw new ServletException("validateUrl must start with https://, its current value is [" + casValidate + "]");
- }
- if (casServiceUrl != null){
- if (! (casServiceUrl.startsWith("https://")|| (casServiceUrl.startsWith("http://") ))){
- throw new ServletException("service URL must start with http:// or https://; its current value is [" + casServiceUrl + "]");
- }
- }
if (! casValidate.startsWith("https://")){ throw new ServletException("validateUrl must start with https://, its current value is [" + casValidate + "]"); } if (casServiceUrl != null){ if (! (casServiceUrl.startsWith("https://")|| (casServiceUrl.startsWith("http://") ))){ throw new ServletException("service URL must start with http:// or https://; its current value is [" + casServiceUrl + "]"); } }
把这两段内容注释掉
(2).修改edu.yale.its.tp.cas.util.SecureURL
- if (!u.getProtocol().equals("https")){
- // IOException may not be the best exception we could throw here
- // since the problem is with the URL argument we were passed, not
- // IO. -awp9
- log.error("retrieve(" + url + ") on an illegal URL since protocol was not https.");
- throw new IOException("only 'https' URLs are valid for this method");
- }
if (!u.getProtocol().equals("https")){ // IOException may not be the best exception we could throw here // since the problem is with the URL argument we were passed, not // IO. -awp9 log.error("retrieve(" + url + ") on an illegal URL since protocol was not https."); throw new IOException("only 'https' URLs are valid for this method"); }
把这段内容注释掉
将CAS https认证的方式改为http相关推荐
- CAS去掉HTTPS认证
如何去掉HTTPS认证? 说明:默认情况下HTTP也是可以访问CAS SERVER的,但认证,登陆,退出等操作均没有任何的效果.所以必须作出下面的修改 1.进入WEB-INF\spring-confi ...
- 服务器双向认证 原理,https认证方式以及HTTPS双向认证过程
https认证方式以及HTTPS双向认证过程 分类:建站推广 编辑: 浏览量:100 2021-07-15 14:29:14 很多网站都配置了HTTPS而不是HTTP,因为安全性得到了极大的提高,如果 ...
- cas 单点登录 http 方式配置实现
前言: 单点登录指的是在系统的集群中,登录其中一个子系统就可以无需再次登录访问其他的子系统或者主系统,目前比较流行的单点登录的解决方案就是使用 cas的方式 准备: 1.下载一个 cas-server ...
- 百度站长HTML添加301错误,百度https认证提示"您的http站点301重定向到https站点"的解决办法...
最近想把一个网站改造成https访问,但是一些都做好了,去百度站长平台认证https,结果怎么提交都是出现"请将您的http站点301重定向到https站点",在百度站长社区提问也 ...
- 百度HTTPS认证显示“您的站点有链接未通过https检验”的解决办法
使用百度HTTPS认证显示"您的站点有链接未通过https检验",但明明已经全站HTTPS了啊. 通过在网页源码中搜索:"http:"发现,是使用的插件及主题中 ...
- Linux 搭建NodeBB社区,搭建CAS登录认证平台,实现Nodebb接入企业CAS认证(一)
一,搭建Nodebb社区 1,安装编译环境nodejs,npm安装后版本号如下(同时得安装redis, git常用开发软件): 2,下载nodebb代码 git clone git://github. ...
- CAS服务http的方式访问不了
CAS服务http的方式访问不了 处理方法: 1)进入到cas服务目录E:\system-run\apache-tomcat-8.5.9-cas\webapps\cas\WEB-INF\classes ...
- 阿里云通信发布全新号码认证服务, 重新定义手机号码认证的方式
摘要:12月12日,阿里云通信宣布号码认证服务正式商用,将重新定义手机号码认证的方式.因移动应用实名制的政策要求,手机号码认证在移动APP的注册.登录等场景用的越来越多.而对于开发者来说,能完成手机号 ...
- 基于华为云平台上iMaster-NCE Campus的中继认证(RADIUS方式)方案简介及配置参考
基于华为云平台上iMaster-NCE Campus的中继认证(RADIUS方式)方案简介及配置参考 功能概述 第三方认证主要应用于商业Wi-Fi终端用户在商场酒店.机场地铁.企业来访等情景通过Wi- ...
最新文章
- ASP.NET Session 使用报告(转贴)
- 快刀斩“乱码”,你需要这些套路!
- html5--6-4 CSS选择器
- sql语句截断_SQL Server中SQL截断和SQL删除语句之间的区别
- java struts2 作用_struts2是什么?如何使用?
- HDU.4352.XHXJ's LIS(数位DP 状压 LIS)
- libevent源码分析系列
- Js 日期选择,可以的一个页面中重复使用本JS日历,兼容IE及火狐等主流浏览器,而且界面简洁、美观,操作体验也不错。...
- 多线程压测_京东618压测时自研中间件暴露出的问题,压测级别数十万/秒
- 微信小程序密码显示隐藏(小眼睛)
- linux如何安装usb转串口驱动,虚拟机下Ubuntu安装usb转串口驱动
- Python爬虫架构
- 如何用微pe+msdn进行纯净重装Windows系统
- FFmpeg进阶:给视频添加文字水印
- 关于新iPad充电的一些误读
- python发送短信验证码_python发送短信验证码
- 小程序疑难杂症破解(一)
- Codeforces 1037E. Trips
- 方案详解 | 如何设计和打造敏捷研发组织
- 告警系统主脚本 告警系统配置文件 告警系统监控项目
热门文章
- 朗科为什么能搞出号称“信息化浪潮里面,中国唯一一个有分量的硬件发明”的U盘?
- tsm2812通用定时器中断_基于TMS320F2812的双通道高精度伺服系统
- 使用LabVIEW 实现物体识别、图像分割、文字识别、人脸识别等深度视觉
- python交通流预测算法_基于机器学习的交通流预测技术的研究与应用
- PostgreSQL ----- CHECK 约束
- 人工智能/机器学习的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告
- 浪涌保护器:保护电子设备免受雷击侵害
- omv检查硬盘坏道_关于怎么用MHDD修复硬盘坏道
- OC 基础 Label
- 软件缺陷主要包含哪些要素?