欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

No principal was found in the response from the CAS server

程序员文章站 2022-07-01 23:15:42
按网上的配置了 ......

按网上的配置了

public string casserverurlprefix = "http://cas-server.com:8080/cas";

public string casserverloginurl = "http://cas-server.com:8080/cas/login";

其它的都没问题,结果一直报错,

no principal was found in the response from the cas server
no principal was found in the response from the cas server


搞了半天,结果发现是cas-server的上下文配错了,没有加cas上下文,导致cas20serviceticketvalidator    : server response异常,返回了casloginview.jsp页面

而正常的应该是这样:
<cas:serviceresponse xmlns:cas='http://www.yale.edu/tp/cas'>
    <cas:authenticationsuccess>
        <cas:user>test</cas:user>


    </cas:authenticationsuccess>
</cas:serviceresponse>

蛋疼....