单点登录(八)-----遇到问题-----Application Not Authorized to Use CAS

来源:互联网 发布:java要学多久能学会 编辑:程序博客网 时间:2024/05/01 16:19



配置好cas后访问cas  client 并没有跳转到登录页面,而是页面报错误提示:

Application Not Authorized to Use CAS.

The application you attempted to authenticate to is not authorized to use CAS.


控制台则报错

CAS ServiceManagement: Unauthorized Service Accessis not found in service registry



原因

原因是cas server 有一个serverId验证,需要验证链接是否匹配。 默认是"serviceId" : "^(https|imaps)://.*"。

默认是不支持http的。




解决方案

解决方案有两个

一是给cas server配置https证书验证。

二是去掉https验证。


可以参考

单点登录(七)-----实战-----cas server去掉https验证


PS:

需要注意的是 

4.2以上的版本 去掉https验证需要修改serverId的匹配规则。

4.2以下的版本 不需要修改serverId的匹配规则,只需要修改配置即可。





1 0
原创粉丝点击