最近在给公司做单点登录差不多做完了,但是在测试的时候发现一个bug,偶尔会出现:重启了casserver的服务器后,重新打开浏览器登录输入正确的用户名密码后会出现相似ticket失效的问题,手动把?ticket=xxxxxxx.example.org去掉后就进去项目了,这让本人很惆怅啊,求高手或遇到过相同问题的救助,最好不要甩网上的链接,查了很多没找到正确的,急急急。
解决方案
50
<filter> <filter-name>CAS Validation Filter</filter-name> <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class> <init-param> <param-name>casServerUrlPrefix</param-name> <param-value>http://localhost:8080/irpcas</param-value> </init-param> <init-param> <param-name>redirectAfterValidation</param-name> <param-value>true</param-value> </init-param> <!-- <init-param> <param-name>artifactParameterName</param-name> <param-value>ticket</param-value> </init-param> --> </filter>
添加redirectAfterValidation参数试试
50
<init-param>
<param-name>exceptionOnValidationFailure</param-name>
<param-value>false</param-value>
</init-param>
<param-name>exceptionOnValidationFailure</param-name>
<param-value>false</param-value>
</init-param>