【发布时间】:2020-03-22 02:40:52
【问题描述】:
我正在使用 CAS 6.0 和带有 Spring Security 的 Spring Boot 设置配置,以便转移到 JWT。查看this 指南,我已经配置了模块依赖项、CAS 服务注册表以及签名和加密密钥。流程很顺利:
- 在 https://localhost:9000/secure/home/test 调用应用程序我被重定向到 CAS 登录,
- https://localhost:8443/cas/login?service=https%3A%2F%2Flocalhost%3A9000%2Flogin%2Fcas 我可以正确指定凭据并在 cookie 中以 JWT 形式查看 TGC,
- 插入凭据后,我被重定向到https://localhost:9000/login/cas。
最后一次调用有两个查询字符串参数redirect=true 和ticket=[JWT string]。 我已经设置了一个过滤器来解码令牌并且它可以工作,但是过滤器链会命中 CasAuthenticationFilter,它会看到票证参数并尝试将其验证为服务票证,但失败了。
如何让它知道jwt,并将请求转发到原始URL?
【问题讨论】:
标签: spring-boot authentication spring-security jwt cas