下载了CAS4.0,改变比较大,计划慢慢研究,慢慢更新。

按以下方法去除CAS4.0的SSL强制要求,这和3.5.2是一样的,FT,明明去除了,但提示还在,一直以为没修改成功。

修改第一处:

 cas/WEB-INF/deployerConfigContext.xml

<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient"/>

 增加参数p:requireSecure="false",是否需要安全验证,即HTTPS,false为不采用。修改后为:

  <bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
 p:httpClient-ref="httpClient"  p:requireSecure="false"/>

   修改第二处:

  cas/WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml

<bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"

      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

posted on 2014-07-30 17:05  Hi,Hi  阅读(986)  评论(0编辑  收藏  举报