1

我已经用 mysql 后端设置了 ruby​​cas-server。但是当我尝试通过 phpCAS 客户端登录时,它被重定向到 ruby​​cas-server url。但是,输入用户名和密码后 - 我收到了这个错误

CAS 认证失败!

您未通过身份验证。

您可以点击此处再次提交您的请求。

如果问题仍然存在,您可以联系本站管理员。

你能告诉我……我的 phpcas 客户端出了什么问题……请帮帮我。

4

1 回答 1

0

This is the problem which generally comes with the development servers when we use no SSL::setNoCasServerValidation(); However even after using setNoCasServerValidation(), the CAS Client internally calls the curl using https, which is the main cause of this error.

So to fix it just go to CAS Library file ../CAS/CAS/Client.php Reach the function

private function _readURL($url, &$headers, &$body, &$err_msg){}

and add this line

$url = str_replace("https", "http", $url);

as the first line of function _readURL(...

Please don't do this in production environment as CAS recommends use of SSL on production.

于 2013-09-12T07:49:07.200 回答