cas 认证客户端输入账号密码登录后跳转报错?
使用@leo大佬提供的扩展laravel_cas_server包搭建了cas_server,使用subfission/cas扩展包搭建了cas_client,在客户端输入账号信息进行登录:
但是回调时候报了下面的错误:
配置方面应该没什么问题,一直追踪源码:
public function handle($request, Closure $next)
{
if ($this->cas->checkAuthentication()) {
// Store the user credentials in a Laravel managed session
session()->put('cas_user', $this->cas->user());
} else {
if ($request->ajax() || $request->wantsJson()) {
return response('Unauthorized.', 401);
}
$this->cas->authenticate();
}
return $next($request);
}
找到对应的方法:
public function checkAuthentication()
{
return $this->isMasquerading() ? true : phpCAS::checkAuthentication();
}
最后发现是方法phpCAS::checkAuthentication()
报的错,但是到这边不知道该怎么解决。。。