按網上的配置了
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>
蛋疼....