Application Not Authorized to Use CAS

当尝试访问配置了CAS的客户端应用时,如果出现'Application Not Authorized to Use CAS'错误,这通常意味着应用未在CAS服务器注册或授权策略不允许使用CAS。错误日志显示服务未经授权。解决方案包括为CAS Server配置HTTPS SSL验证或移除HTTPS验证。对于CAS Server 4.2及以上版本,需要修改serverId匹配规则;而4.2以下版本仅需修改配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

该Cas server 使用6.6版本

配置好cas后访问cas  client 相关的应用,并没有跳转到登录页面,而是页面报错:

Application Not Authorized to Use CAS

The application you attempted to authenticate to is not authorized to use CAS. This usually indicates that the application is not registered with CAS, or its authorization policy defined in its registration record prevents it from leveraging CAS functionality, or it's malformed and unrecognized by CAS. Contact your CAS administrator to learn how you might register and integrate your application with CAS.

后台报错

>
2022-11-01 13:55:15,467 ERROR [org.apereo.cas.services.web.support.RegisteredServiceResponseHeadersEnforcementFilter] - <Service unauthorized
        RegisteredServiceAccessStrategyAuditableEnforcer.java:lambda$execute$6:200
        Optional.java:orElseGet:369
        RegisteredServiceAccessStrategyAuditableEnforcer.java:execute:194
 

原因

这是因为cas server 有一個serverId验证,需要验证链接是否,默认是serviceId:https|imaps://*

默认不支持http的:

 解决方案,二选一

一是给cas server配置https的ssl验证。参考:CAS Server 6 去掉Https验证_longjuanfengV的博客-CSDN博客

二是去掉https验证。

注意点:

1:cas server 4.2以上去掉https验证需要修改serverId匹配规则。

2:cas server 4.2以下的不需要修改serverId的匹配规则,只需要修改配置即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值