SSO-安全证书配置

  CAS默认使用的是HTTPS协议,如果对安全要求不高,可以使用HTTP协议
修改deployerConfigContext.xml(cas/WEB-INF)增加参数 p:requireSecure="false",是否需要安全验证,即HTTP,false表示不采用。
<bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" 
p:httpClient-ref="httpClient"
p:requireSecure="false" /> 修改ticketGrantingTicketCookieGenerator.xml(cas/WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml)
中ticketGrantingTicketCookieGenerator p:cookieSecure 属性修改为false.
<bean id="ticketGrantingTicketCookieGenerator"
class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
p:cookieSecure="false"
p:cookieMaxAge="-1"
p:cookieName="CASTGC"
p:cookiePath="/cas" />

配置转换器返回更多用户信息

从cas server登录成功后,默认只能从cas server得到用户名,但程序中也可能遇到需要得到更多如姓名,手机号,email等更多用户信息的情况

客户端配置支持http协议

  CAS 默认使用的是HTTPS协议,如果对安全要求不高,可以使用HTTP协议
修改deployerConfigContext.xml(cas/WEB-INF)增加参数 p:requireSecure="false",是否需要安全验证,即HTTPS,false表示不采用
<bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient"
p:requireSecure="false" /> cas.war\WEB-INF\classes\services\HTTPSandIMAPS-10000001.json
"serviceId" : "^(https|imaps|http)://.*",
"name" : "HTTPS and IMAPS and HTTP", 修改ticketGrantingTicketCookieGenerator.xml(cas/WEB-INF/spring-configutration/ticketGrantingCookieGenerator.xml)
中ticketGrantingTicketCookieGenerator p:cookieSecure 属性修改为false
<bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
p:cookieSecure="false"
p:cookieMaxAge="-1"
p:cookieName="CASTGC"
p:cookiePath="/cas" />
将参数p:cookieSecure="true" 改为p:cookieSecure="false",同理为https验证相关,TURE为采用HTTPS验证与deployerConfigContext.xml参数保持一致
参数p:cookieMaxAge="-1",简单的说是COOKIE的最大生命周期,-1为无生命周期,即只在当前打开的IE窗口有效,IE关闭或重新打开其他窗口,仍会要求验证。
可以根据需要修改为大于0的数字,比如3600等,意思是在3600秒内,打开任意IE窗口,都不需要验证

最新文章

  1. ES6中的模板字符串和新XSS Payload
  2. 命令安装VS
  3. 第三次作业——个人作业,k米案例分析
  4. 如何做一份能忽悠投资人的PPT
  5. C#简单文件下载-3行代码
  6. 嵌入式MCU开发群资源
  7. ASP.NET自定义控件组件开发 第三章 为控件添加事件 后篇
  8. swift AVAudioPlayer播放音频时声音太小
  9. input表单的type属性详解,不同type不同属性之间区别
  10. Python之MySQL库表操作
  11. CentOS6.3上搭建expect无交互开发环境
  12. Android为TV端助力 doc里面adb连接出现问题的解决方法
  13. VS2017远程调试C#或 Visual Studio 中的 Visual Basic 项目
  14. js--------1.时间
  15. 学习笔记44—Linux下安装freesurfer
  16. Python Scrapy 爬取煎蛋网妹子图实例(二)
  17. linux杀死进程方法
  18. PAT甲题题解-1042. Shuffling Machine (20)-模拟
  19. HighCharts、EChart图表X轴纵向显示
  20. 2018.08.31 bzoj3566: [SHOI2014]概率充电器(概率dp+容斥原理)

热门文章

  1. IPMB接口协议总结
  2. Educational Codeforces Round 21 Problem F (Codeforces 808F) - 最小割 - 二分答案
  3. python中的迭代器和生成器学习笔记总结
  4. 分页器的js实现代码 bootstrap Paginator.js
  5. luogu4473 BZOJ2143 2011[国家集训队]飞飞侠
  6. 使用Android-studio开发移动app与weex结合开发详细步骤
  7. 【Coursera】Technology :Fifth Week(2)
  8. IntelliJ IDEA问题总结
  9. hdu 4521 小明系列问题——小明序列 线段树+二分
  10. hdu 5668 Circle 中国剩余定理