记录一下 spring-security-cas-client 遇到的坑。
springmvc + spring-security-cas-client 3.0.5.RELEASE 问题版本
前因:做了个定时刷新页面后,在CAS登录时会出现401报错。
Ticket ‘ST-84715-x2AEnEaqnLB6WgKJNCaqwNcs-y8localhost’ does not match supplied service. The original service was ‘https://abc.com/xx/j_spring_cas_security_check?service=https://abc.com/xx/main/home’ and was ‘https://abc.com/xx/j_spring_cas_security_check?service=https://abc.com/xx/zs/myPendingStats’.
报错信息。
其中 https://abc.com/xx/zs/myPendingStats 为刷新页面中的请求地址。
https://abc.com/xx/main/home 为用户进入系统首页地址。
两个地址验证时不一致导致401。经过一顿排查,搜集资料无果,最后把 JAR 包升级到 3.0.8.RELEASE(最新版本) 解决了。