手机版
你好,游客 登录 注册
背景:
阅读新闻

CAS 4.1.10关闭HTTPS

[日期:2017-02-02] 来源:Linux社区  作者:fengwan [字体: ]

与大家分享下CAS 4.1.10关闭HTTPS的方法,希望有所帮助。

1.修改WEB-INF/deployerConfigContext.xml
    <bean id="proxyAuthenticationHandler"
          class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
          p:httpClient-ref="supportsTrustStoreSslSocketFactoryHttpClient"
          p:requireSecure="false" />

在p:httpClient-ref="supportsTrustStoreSslSocketFactoryHttpClient"后
增加p:requireSecure="false"

2.修改WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml
    <bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
          c:casCookieValueManager-ref="cookieValueManager"
          p:cookieSecure="false"
          p:cookieMaxAge="-1"
          p:cookieName="TGC"
          p:cookiePath=""/>

将p:cookieSecure="true"修改为p:cookieSecure="false"

3.修改WEB-INF/spring-configuration/warnCookieGenerator.xml
    <bean id="warnCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
          p:cookieHttpOnly="false"
          p:cookieSecure="false"
          p:cookieMaxAge="-1"
          p:cookieName="CASPRIVACY"
          p:cookiePath=""/>

将p:cookieSecure="true"修改为p:cookieSecure="false"

4.修改注册服务WEB-INF/classes/services/HTTPSandIMAPS-10000001.json
将"serviceId" : "^(https|imaps)://.*"修改为"serviceId" : "^(https|http|imaps)://.*"

5.测试HTTP/HTTPS
http://192.168.10.102:8080/cas/login?service=http://www.a.com

网上很多资料只提示修改前面3个配置,却没有更改注册服务配置,所以就会出现
Application Not Authorized to Use CAS
The application you attempted to authenticate to is not authorized to use CAS.

 

本文永久更新链接地址http://www.linuxidc.com/Linux/2017-02/140147.htm

linux
相关资讯       CAS  https 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款