阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

CAS 4.1.10关闭HTTPS

147次阅读
没有评论

共计 1517 个字符,预计需要花费 4 分钟才能阅读完成。

与大家分享下 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

CAS 4.1.10 关闭 HTTPS

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

 CAS 4.1.10 关闭 HTTPS

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

正文完
星哥说事-微信公众号
post-qrcode
 
星锅
版权声明:本站原创文章,由 星锅 2022-01-21发表,共计1517字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中