下载了CAS4.0,改变比较大,计划慢慢研究,慢慢更新。web
按如下方法去除CAS4.0的SSL强制要求,这和3.5.2是同样的,FT,明明去除了,但提示还在,一直觉得没修改为功。spring
修改第一处:安全
cas/WEB-INF/deployerConfigContext.xmlcookie
<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient"/>ui
增长参数p:requireSecure="false",是否须要安全验证,即HTTPS,false为不采用。修改后为:spa
<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient" p:requireSecure="false"/>xml
修改第二处:生命周期
cas/WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xmlio
<bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"class
p:cookieSecure="true"
p:cookieMaxAge="-1"
p:cookieName="CASTGC"
p:cookiePath="/cas" />
参数p:cookieSecure="true",同理为HTTPS验证相关,TRUE为采用HTTPS验证,FALSE为不采用https验证。
参数p:cookieMaxAge="-1",简单说是COOKIE的最大生命周期,-1为无生命周期,即只在当前打开的IE窗口有效,IE关闭或从新打开其它窗口,仍会要求验证。能够根据须要修改成大于0的数字,好比3600等,意思是在3600秒内,打开任意IE窗口,都不须要验证。
这里把 cookieSecure修改成false就好了
同第二步修改cas/WEB-INF/spring-configuration/warnCookieGenerator.xml