国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

在使用apereo/phpcas 時出現(xiàn)報錯

zyyzcr

問題描述

為實現(xiàn)統(tǒng)一身份認證引入apereo/phpcas,
通過composer require apereo/phpcas 安裝

程序代碼

            $casHost = config('plugin.sso.cas.host');
            $casPort = config('plugin.sso.cas.port');
            $casContext = config('plugin.sso.cas.context');
            $casValidateCert = config('plugin.sso.cas.validate_cert', true);
            $casVersion = config('plugin.sso.cas.version', '3.0');

            $serviceUrl = "http://" . $request->host() . $request->path();

            // 初始化CAS客戶端
            phpCAS::client($casVersion, $casHost, $casPort, $casContext, $serviceUrl,false);

            if ($casValidateCert) {
                phpCAS::setCasServerCACert(config('plugin.sso.cas.cert_path'));
            } else {
                phpCAS::setNoCasServerValidation();
            }

            phpCAS::forceAuthentication();

            $username = phpCAS::getUser();
            if (empty($username)) {
                throw new \Exception('無法獲取CAS用戶名');
            }

            $attributes = phpCAS::getAttributes();
            \Log::info('CAS用戶屬性', $attributes);

            $userData = [
                'username' => $username,
                'nickname' => $username,
                'avatar' => '',
                'email' => $attributes['email'] ?? '',
                'mobile' => $attributes['mobile'] ?? '',
                'login_at' => date('Y-m-d H:i:s'),
            ];

            $request->session()->put('admin', $userData);
            return redirect('/account/index');

報錯信息

當執(zhí)行到 phpCAS::client($casVersion, $casHost, $casPort, $casContext, $serviceUrl,false);時,Worker進程退出,報錯如下:

Worker[814111] process terminated
43 0 0
0個回答

??