基本配置 參考之前得隨筆 http://www.cnblogs.com/rocky-fang/p/5354947.html
1. 修改tomcat-cas 配置
1.1 在 D:\test\sso\tomcat-cas\webapps\cas\WEB-INF路徑下找到 deployerConfigContext.xml修改如下:(增加p:requireSecure="false")
<bean id="proxyAuthenticationHandler"
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient" p:requireSecure="false" />
1.2 D:\test\sso\tomcat-cas\webapps\cas\WEB-INF\spring-configuration下找到 ticketGrantingTicketCookieGenerator.xml 修改如下:(修改 p:cookieSecure="true")
<bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
p:cookieSecure="false"
p:cookieMaxAge="-1"
p:cookieName="CASTGC"
p:cookiePath="/cas" />
1.3 D:\test\sso\tomcat-cas\webapps\cas\WEB-INF\spring-configuration下找到 warnCookieGenerator.xml 修改如下: (修改 p:cookieSecure="true")
<bean id="warnCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
p:cookieSecure="false"
在 cas 服務器運行的時候,就可以只使用 http 請求了,省去了 HTTPS 協議的麻煩配置。