diff --git a/app/Controllers/Admin/Cloudflare/CloudflareController.php b/app/Controllers/Admin/Cloudflare/CloudflareController.php index 4f2b516..4a9c5e1 100644 --- a/app/Controllers/Admin/Cloudflare/CloudflareController.php +++ b/app/Controllers/Admin/Cloudflare/CloudflareController.php @@ -68,7 +68,7 @@ abstract class CloudflareController extends AdminController //Transaction Rollback $this->getModel()->transRollback(); log_message("error", $e->getMessage()); - return redirect()->back()->withInput()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); + return redirect()->back()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); } } @@ -88,7 +88,7 @@ abstract class CloudflareController extends AdminController //Transaction Rollback $this->getModel()->transRollback(); log_message("error", $e->getMessage()); - return redirect()->back()->withInput()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); + return redirect()->back()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); } } } diff --git a/app/Controllers/MVController.php b/app/Controllers/MVController.php index 83811cc..34d6a38 100644 --- a/app/Controllers/MVController.php +++ b/app/Controllers/MVController.php @@ -217,7 +217,7 @@ abstract class MVController extends CommonController //Transaction Rollback $this->getModel()->transRollback(); log_message("error", $e->getMessage()); - return redirect()->back()->withInput()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); + return redirect()->back()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); } } //단일필드작업 @@ -238,7 +238,7 @@ abstract class MVController extends CommonController //Transaction Rollback $this->getModel()->transRollback(); log_message("error", $e->getMessage()); - return redirect()->back()->withInput()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); + return redirect()->back()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); } } //삭제 @@ -266,7 +266,7 @@ abstract class MVController extends CommonController //Transaction Rollback $this->getModel()->transRollback(); log_message("error", $e->getMessage()); - return redirect()->back()->withInput()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); + return redirect()->back()->with('error', __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); } } // 리스트 @@ -346,7 +346,7 @@ abstract class MVController extends CommonController log_message("debug", $this->getModel()->getLastQuery()); return $entitys; } - final protected function list_procedure(): RedirectResponse|string + final protected function list_procedure(): string { try { helper(['form']); @@ -358,17 +358,15 @@ abstract class MVController extends CommonController $this->pagination = $this->list_pagination_process(); //모델 처리 $this->entitys = $this->list_entitys_process(); - // 현재 URL을 스택에 저장 $this->pushCurrentUrl(); - return view( $this->view_path . "index", ['viewDatas' => $this->getViewDatas()] ); } catch (\Exception $e) { log_message("error", $e->getMessage()); - return redirect()->back()->with('error', $e->getMessage()); + return $this->helper->alert($e->getMessage()); } } @@ -440,7 +438,7 @@ abstract class MVController extends CommonController return $this->response->download($full_path, null)->setFileName($file_name); } catch (\Exception $e) { log_message("error", $e->getMessage()); - return redirect()->back()->with('error', $e->getMessage()); + return $this->helper->alert($e->getMessage()); } } } diff --git a/app/Controllers/UserController.php b/app/Controllers/UserController.php index 042a984..96d37c0 100644 --- a/app/Controllers/UserController.php +++ b/app/Controllers/UserController.php @@ -5,7 +5,7 @@ namespace App\Controllers; use App\Helpers\UserHelper; use App\Libraries\MyAuth\GoogleAuth; use App\Libraries\MyAuth\LocalAuth; -use App\Libraries\MySocket\GoogleSocket; +use App\Libraries\MySocket\GoogleSocket\API as GoogleSocket; use App\Models\UserModel; use CodeIgniter\HTTP\RedirectResponse; @@ -83,8 +83,6 @@ class UserController extends FrontController $this->init('login'); try { helper(['form']); - $this->create_form_process(); - //구글 로그인 BUTTON용 $google_socket = new GoogleSocket(); $this->google_url = $google_socket->createAuthUrl(); @@ -131,8 +129,8 @@ class UserController extends FrontController if (!$access_code) { throw new \Exception("구글 로그인 실패"); } - $auth = new GoogleAuth($access_code); - $auth->login($auth->checkUser()); + $auth = new GoogleAuth(); + $auth->login($auth->checkUser($access_code)); $this->message = "로그인 성공"; $this->getModel()->transCommit(); log_message("notice", __FUNCTION__ . $this->message); diff --git a/app/Entities/UserSNSEntity.php b/app/Entities/UserSNSEntity.php index 1470baa..8edbf3f 100644 --- a/app/Entities/UserSNSEntity.php +++ b/app/Entities/UserSNSEntity.php @@ -25,8 +25,16 @@ class UserSNSEntity extends CommonEntity { return $this->attributes[UserSNSModel::PK]; } + public function getSite(): string + { + return $this->attributes['site']; + } public function getID(): string { return $this->attributes['id']; } + public function getEmail(): string + { + return $this->attributes['email']; + } } diff --git a/app/Filters/AuthFilter.php b/app/Filters/AuthFilter.php index c392a76..e34f655 100644 --- a/app/Filters/AuthFilter.php +++ b/app/Filters/AuthFilter.php @@ -27,6 +27,9 @@ class AuthFilter implements FilterInterface { // 로그인 않했으면 if (!session()->has(SESSION_NAMES['ISLOGIN'])) { + $urlStack = session()->get('url_stack', []) ?? []; + $urlStack[] = current_url() . ($request->getUri()->getQuery() ? "?" . $request->getUri()->getQuery() : "");; + session()->set('url_stack', $urlStack); return redirect()->to(URLS['LOGIN'])->with('error', '로그인을하셔야합니다.'); } //User Role 비교 // 회원 ROLES이 필요ROLE($arguments[0]) 목록에 존재하지 않으면(ACL) diff --git a/app/Libraries/MyAuth/GoogleAuth.php b/app/Libraries/MyAuth/GoogleAuth.php index 3db90ed..a83b453 100644 --- a/app/Libraries/MyAuth/GoogleAuth.php +++ b/app/Libraries/MyAuth/GoogleAuth.php @@ -3,72 +3,50 @@ namespace App\Libraries\MyAuth; use App\Entities\UserEntity; -use App\Libraries\MySocket\GoogleSocket; -use App\Models\UserSNSModel; +use App\Libraries\MySocket\GoogleSocket\CURL; +use App\Libraries\MySocket\GoogleSocket\API as GoogleSocket; use App\Models\UserModel; use CodeIgniter\Exceptions\PageNotFoundException; -use Google\Service\Oauth2; class GoogleAuth extends MyAuth { - private ?GoogleSocket $_mySocket = null; - private string $_site = "GOOGLE"; - private ?UserSNSModel $_model = null; - private string $access_code = ""; - public function __construct(string $access_code) + private ?UserModel $_model = null; + private string $_access_code = ""; + public function __construct() { parent::__construct(); - $this->access_code = $access_code; } public function getMySocket(): GoogleSocket { if ($this->_mySocket === null) { $this->_mySocket = new GoogleSocket(); - $this->_mySocket->setToken($this->access_code); } + $this->_mySocket->setToken($this->_access_code); + $this->_mySocket->setUserSNSEntity(); return $this->_mySocket; } - final protected function getModel(): UserSNSModel + final protected function getModel(): UserModel { if ($this->_model === null) { - $this->_model = model(UserSNSModel::class); + $this->_model = model(UserModel::class); } return $this->_model; } - public function checkUser(): UserEntity + public function checkUser(string $access_code): UserEntity { try { + $this->_access_code = $access_code; // Google 서비스 설정 - $userInfo = $this->getMySocket()->getUserInfo(); - //기존 등록된 사용자가 있는지 검사 - $this->getModel()->where(UserSNSModel::SITE, $this->_site); - $entity = $this->getModel()->getEntityByID($userInfo['id']); - if ($entity === null) { - //없다면 새로 등록 - $formDatas = [ - 'site' => $this->_site, - 'id' => $userInfo['id'], - 'name' => $userInfo['name'], - 'email' => $userInfo['email'], - 'detail' => var_export($userInfo, true), - 'status' => 'standby', - ]; - $entity = $this->getModel()->create($formDatas); - } - //상태가 use(승인완료)가 아니라면 - if ( - $entity->status !== DEFAULTS['STATUS'] - ) { - throw new PageNotFoundException("{$this->_site}}의{$userInfo['email']}:{$userInfo['name']}님은 " . $entity->status . "입니다"); - } + $userSNS_entity = $this->getMySocket()->getUserSNSEntity(); + //local db 사용와의 연결 확인 $userModel = model(UserModel::class); - $user_entity = $userModel->getEntityByID($entity->getID()); + $user_entity = $userModel->getEntityByID($userSNS_entity->getID()); if ($user_entity === null) { - throw new PageNotFoundException("{$this->_site}의{$userInfo['email']}:{$userInfo['name']}님은 아직 사용자 연결이 이루어지지 않았습니다. "); + throw new PageNotFoundException("{$userSNS_entity->getSite()}의{$userSNS_entity->getEmail()}:{$userSNS_entity->getTitle()}님은 아직 사용자 연결이 이루어지지 않았습니다. "); } return $user_entity; } catch (\Google_Service_Exception $e) { diff --git a/app/Libraries/MySocket/GoogleSocket/API.php b/app/Libraries/MySocket/GoogleSocket/API.php new file mode 100644 index 0000000..90ae210 --- /dev/null +++ b/app/Libraries/MySocket/GoogleSocket/API.php @@ -0,0 +1,115 @@ +_client === null) { + $this->_client = new Client(); + $this->_client->setClientId(env('socket.google.client.id')); + $this->_client->setClientSecret(env('socket.google.client.key')); + $this->_client->setRedirectUri(base_url(env('socket.google.client.callback_url'))); + $this->_client->addScope(Oauth2::USERINFO_EMAIL); + $this->_client->addScope(Oauth2::USERINFO_PROFILE); + // $this->setPrompt('select_account consent'); + // $this->setAccessType('offline'); + // SSL 검증 비활성화 + $this->_client->setHttpClient(new \GuzzleHttp\Client(['verify' => false])); + // 사용자 정의 CA 번들 사용 + // $this->setHttpClient(new \GuzzleHttp\Client(['verify' => '/path/to/cacert.pem'])); + } + return $this->_client; + } + + public function createAuthUrl(): string + { + return $this->getClient()->createAuthUrl(); + } + + //TokenInfo + // (object) array( + // 'access_token' => 'sdfsdfsdfsdf', + // 'expires_in' => 3599, + // 'refresh_token' => 'sdfsdf', + // 'scope' => 'https://www.googleapis.com/auth/userinfo.profile openid https://www.googleapis.com/auth/userinfo.email', + // 'token_type' => 'Bearer', + // 'id_token' => 'fadfasdfsadf.sdfsdf.sdfsd', + // ) + // id_token(.을기준으로 base64_decode): + // DEBUG - 2024-10-10 07:25:01 --> array ( + // 'alg' => 'RS256', + // 'kid' => 'a50f6e70ef4bsdfsdffb8f54dce9ee', + // 'typ' => 'JWT', + // ) + // DEBUG - 2024-10-10 07:25:01 --> array ( + // 'iss' => 'accounts.google.com', + // 'azp' => '105607sdfsdfsdfsdfogleusercontent.com', + // 'aud' => '1056073563687sdfsdfsdftent.com', + // 'sub' => '103667492342341096838', + // 'email' => 'sdfsdfsdf@gmail.com', + // 'email_verified' => true, + // 'at_hash' => 'RKDNDFSrkeZ_LWg', + // 'iat' => 1728df545102, + // 'exp' => 172854df8702, + // ) + // DEBUG - 2024-10-10 07:25:01 --> NULL + public function setToken(string $access_code): void + { + // 토큰 정보 가져오기 + $tokenInfo = $this->getClient()->fetchAccessTokenWithAuthCode($access_code); + if (isset($tokenInfo['error'])) { + throw new ConfigException($tokenInfo['error']); + } + log_message("debug", var_export($tokenInfo, true)); + $this->_access_token = $tokenInfo[$this->_token_name]; + // Google Service에 접근하기 위해 Access Token 설정 + $this->getClient()->setAccessToken([ + 'access_token' => $this->_access_token, + 'expires_in' => 3600, + 'created' => time(), + ]); + if ($this->getClient()->isAccessTokenExpired()) { + $this->getClient()->refreshToken($tokenInfo['refresh_token']); + } + // 세션에 Token 값 설정 + $this->session->set($this->_token_name, $this->_access_token); + } + + public function getUserSNSEntity(): UserSNSEntity + { + $this->getClient()->setAccessToken($this->getToken()); + $oauth = new Oauth2($this->getClient()); + $userInfo = $oauth->userinfo->get(); + log_message("debug", var_export($userInfo, true)); + // 사용자정보 설정하기 + $this->getModel()->where($this->getModel()::SITE, $this->getSite()); + $entity = $this->getModel()->getEntityByID($userInfo['id']); + if ($entity === null) { + //없다면 새로 등록 + $formDatas = [ + 'site' => $this->getSite(), + 'id' => $userInfo->id, + 'name' => $userInfo->name, + 'email' => $userInfo->email, + 'detail' => var_export($userInfo, true), + 'status' => 'standby', + ]; + $entity = $this->getModel()->create($formDatas); + } + //상태가 use(승인완료)가 아니라면 + if ($entity->status !== DEFAULTS['STATUS']) { + throw new PageNotFoundException("{$entity->getSite()}의{$entity->getEmail()}:{$entity->getTitle()}님은 {$entity->status}입니다 "); + } + return $entity; + } +} diff --git a/app/Libraries/MySocket/GoogleSocket.php b/app/Libraries/MySocket/GoogleSocket/CURL.php similarity index 55% rename from app/Libraries/MySocket/GoogleSocket.php rename to app/Libraries/MySocket/GoogleSocket/CURL.php index 0529157..6383d7e 100644 --- a/app/Libraries/MySocket/GoogleSocket.php +++ b/app/Libraries/MySocket/GoogleSocket/CURL.php @@ -1,20 +1,25 @@ session = Services::session(); + } + + public function getClient(): Client + { + if ($this->_client === null) { + $this->_client = new Client(); + } + return $this->_client; } public function createAuthUrl(): string @@ -31,14 +36,34 @@ class GoogleSocket extends MySocket return "https://accounts.google.com/o/oauth2/v2/auth?" . $options; } + //TokenInfo // (object) array( // 'access_token' => 'sdfsdfsdfsdf', // 'expires_in' => 3599, // 'refresh_token' => 'sdfsdf', // 'scope' => 'https://www.googleapis.com/auth/userinfo.profile openid https://www.googleapis.com/auth/userinfo.email', // 'token_type' => 'Bearer', - // 'id_token' => 'fadfasdfsadf', + // 'id_token' => 'fadfasdfsadf.sdfsdf.sdfsd', // ) + // id_token(.을기준으로 base64_decode): + // DEBUG - 2024-10-10 07:25:01 --> array ( + // 'alg' => 'RS256', + // 'kid' => 'a50f6e70ef4bsdfsdffb8f54dce9ee', + // 'typ' => 'JWT', + // ) + // DEBUG - 2024-10-10 07:25:01 --> array ( + // 'iss' => 'accounts.google.com', + // 'azp' => '105607sdfsdfsdfsdfogleusercontent.com', + // 'aud' => '1056073563687sdfsdfsdftent.com', + // 'sub' => '103667492342341096838', + // 'email' => 'sdfsdfsdf@gmail.com', + // 'email_verified' => true, + // 'at_hash' => 'RKDNDFSrkeZ_LWg', + // 'iat' => 1728df545102, + // 'exp' => 172854df8702, + // ) + // DEBUG - 2024-10-10 07:25:01 --> NULL + public function setToken(string $access_code): void { $options = [ @@ -49,10 +74,9 @@ class GoogleSocket extends MySocket 'grant_type' => 'authorization_code', ]; $response = $this->post("https://accounts.google.com/o/oauth2/token", $options); - $tokenInfo = json_decode($response->getBody(), true); - if (isset($tokenInfo['error'])) { + if ($response->getStatusCode() != 200) { $message = sprintf( - "Google: %s에서 API 호출 실패: \n--request options--\n%s\n--response--\n%s\n", + "Google: %s에서 API 호출 실패: \n--request options--\n%s\n--response--\n%s\n", __FUNCTION__, var_export($options, true), var_export($response, true) @@ -60,7 +84,9 @@ class GoogleSocket extends MySocket log_message("error", $message); throw new \Exception($message); } - if (!isset($tokenInfo[$this->_token_name]) || empty($tokenInfo[$this->_token_name])) { + $tokenInfo = json_decode($response->getBody(), true); + // log_message("debug", var_export($tokenInfo, true)); + if (isset($tokenInfo['error']) || !isset($tokenInfo[$this->_token_name]) || empty($tokenInfo[$this->_token_name])) { $message = sprintf( "Google: Token 정보가 없습니다.\n--tokenInfo--\n%s\n", __FUNCTION__, @@ -69,19 +95,18 @@ class GoogleSocket extends MySocket log_message("error", $message); throw new \Exception($message); } - //토큰 Type정보 가져오기 getUserInfo()에서 사용 - $this->_token_type = $tokenInfo['token_type']; + //JWT값 + // $jwts = explode('.', $tokenInfo['id_token']); + // foreach ($jwts as $jwt) { + // $info = json_decode(base64_decode($jwt), true); + // // log_message("debug", var_export($info, true)); + // } // 토큰 정보 가져오기 $this->_access_token = $tokenInfo[$this->_token_name]; // 세션에 Token 값 설정 $this->session->set($this->_token_name, $this->_access_token); } - public function getToken(): string - { - return $this->session->get($this->_token_name); - } - // throw new \Exception(__METHOD__ . "에서 데이터 처리 필요"); // DEBUG - 2023-07-13 12:54:51 --> \Google\Service\Oauth2\Userinfo::__set_state(array( // 'internal_gapi_mappings' => @@ -110,12 +135,17 @@ class GoogleSocket extends MySocket // 'picture' => 'https://lh3.googleusercontent.com/a/AAcHTteFSgefsdfsdRJBkJA2tBEmg4PQrvI1Ta_5IXu5=s96-c', // 'verifiedEmail' => true, // )) - public function getUserInfo(): array + public function getUserSNSEntity(): UserSNSEntity { - $options = ["Authorization: {$this->_token_type} {$this->getToken()}"]; - $response = $this->get("https://www.googleapis.com/oauth2/{$this->_google_oauth_version}/userinfo", $options); - $userInfo = json_decode($response->getBody(), true); - if (isset($userInfo['error'])) { + $options = [ + "headers" => [ + "Authorization" => "Bearer {$this->getToken()}", + "Accept" => "application/json", + 'User-Agent' => $this->getUserAgent() + ], + ]; + $response = $this->get("https://www.googleapis.com/oauth2/v3/userinfo", $options); + if ($response->getStatusCode() != 200) { $message = sprintf( "Google: %s에서 API 호출 실패: \n--request options--\n%s\n--response--\n%s\n", __FUNCTION__, @@ -125,7 +155,9 @@ class GoogleSocket extends MySocket log_message("error", $message); throw new \Exception($message); } - if (isset($userInfo['email']) || empty($tokenInfo['email'])) { + $userInfo = json_decode($response->getBody(), true); + log_message("debug", var_export($userInfo, true)); + if (isset($userInfo['error']) || !isset($userInfo['email']) || empty($userInfo['email'])) { $message = sprintf( "Google: User 정보가 없습니다.\n--userInfo--\n%s\n", __FUNCTION__, @@ -134,7 +166,25 @@ class GoogleSocket extends MySocket log_message("error", $message); throw new \Exception($message); } - // 사용자정보 가져오기 - return $userInfo; + // 사용자정보 설정하기 + $this->getModel()->where(UserSNSModel::SITE, $this->getSite()); + $entity = $this->getModel()->getEntityByID($userInfo['id']); + if ($entity === null) { + //없다면 새로 등록 + $formDatas = [ + 'site' => $this->getSite(), + 'id' => $userInfo['id'], + 'name' => $userInfo['name'], + 'email' => $userInfo['email'], + 'detail' => var_export($userInfo, true), + 'status' => 'standby', + ]; + $entity = $this->getModel()->create($formDatas); + } + //상태가 use(승인완료)가 아니라면 + if ($entity->status !== DEFAULTS['STATUS']) { + throw new PageNotFoundException("{$entity->getSite()}의{$entity->getEmail()}:{$entity->getTitle()}님은 {$entity->status}입니다 "); + } + return $entity; } } diff --git a/app/Libraries/MySocket/GoogleSocket/GoogleSocket.php b/app/Libraries/MySocket/GoogleSocket/GoogleSocket.php new file mode 100644 index 0000000..1911a22 --- /dev/null +++ b/app/Libraries/MySocket/GoogleSocket/GoogleSocket.php @@ -0,0 +1,41 @@ +session = Services::session(); + } + abstract public function getClient(): mixed; + abstract public function createAuthUrl(): string; + abstract public function setToken(string $access_code): void; + abstract public function getUserSNSEntity(): UserSNSEntity; + final public function getToken(): string + { + return $this->session->get($this->_token_name); + } + final public function getSite(): string + { + return $this->_site; + } + final protected function getModel(): UserSNSModel + { + if ($this->_model === null) { + $this->_model = model(UserSNSModel::class); + } + return $this->_model; + } +} diff --git a/app/Libraries/MySocket/GoogleSocketAPI.php b/app/Libraries/MySocket/GoogleSocketAPI.php deleted file mode 100644 index e3100e2..0000000 --- a/app/Libraries/MySocket/GoogleSocketAPI.php +++ /dev/null @@ -1,88 +0,0 @@ -setClientId(env('socket.google.client.id')); - $this->setClientSecret(env('socket.google.client.key')); - $this->setRedirectUri(base_url(env('socket.google.client.callback_url'))); - $this->addScope(Oauth2::USERINFO_EMAIL); - $this->addScope(Oauth2::USERINFO_PROFILE); - // $this->setPrompt('select_account consent'); - // $this->setAccessType('offline'); - // SSL 검증 비활성화 - $this->setHttpClient(new \GuzzleHttp\Client(['verify' => false])); - // 사용자 정의 CA 번들 사용 - // $this->setHttpClient(new \GuzzleHttp\Client(['verify' => '/path/to/cacert.pem'])); - $this->session = Services::session(); - } - - public function setToken(string $access_code): void - { - // 토큰 정보 가져오기 - $tokenInfo = $this->fetchAccessTokenWithAuthCode($access_code); - if (isset($tokenInfo['error'])) { - throw new ConfigException($tokenInfo['error']); - } - // dd($tokenInfo); - $this->_access_token = $tokenInfo[$this->_token_name]; - // Google Service에 접근하기 위해 Access Token 설정 - $this->setAccessToken([ - 'access_token' => $this->_access_token, - 'expires_in' => 3600, - 'created' => time(), - ]); - // 세션에 Token 값 설정 - $this->session->set($this->_token_name, $this->_access_token); - } - - public function getToken(): string - { - return $this->session->get($this->_token_name); - } - - public function isAccessTokenValid(): bool - { - // 액세스 토큰이 없으면 유효하지 않음 - if (empty($this->getAccessToken())) { - return false; - } - - // 토큰의 만료 시간 확인 - $expirationTime = $this->getTokenExpirationTime(); - if ($expirationTime === null) { - return false; - } - - // 현재 시간과 비교하여 유효성 확인 - return $expirationTime > time(); - } - - private function getTokenExpirationTime(): ?int - { - // 토큰 정보 디코딩 - $tokenParts = explode('.', $this->getToken()); - if (count($tokenParts) !== 3) { - return null; - } - - $payload = json_decode(base64_decode($tokenParts[1]), true); - if (!isset($payload['exp'])) { - return null; - } - - return $payload['exp']; - } -} diff --git a/app/Libraries/MySocket/MySocket.php b/app/Libraries/MySocket/MySocket.php index b2e55d0..e57dc22 100644 --- a/app/Libraries/MySocket/MySocket.php +++ b/app/Libraries/MySocket/MySocket.php @@ -6,10 +6,10 @@ use Psr\Http\Message\ResponseInterface; use GuzzleHttp\Cookie\CookieJar; use GuzzleHttp\Client; -abstract class MySocket extends Client +class MySocket extends Client { private $_cookieJar = null; - protected function __construct(array $config = []) + public function __construct(array $config = []) { // SSL 인증서 검증을 비활성화 $config['verify'] = getenv("socket.web.ssl.verify") == "true" ? true : false; diff --git a/app/Views/layouts/admin/top.php b/app/Views/layouts/admin/top.php index 0966634..93f51ea 100644 --- a/app/Views/layouts/admin/top.php +++ b/app/Views/layouts/admin/top.php @@ -27,7 +27,16 @@ = ICONS['LOGIN'] . $viewDatas['session']->get(SESSION_NAMES['AUTH'])['name'] ?>