diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 0eb6a56..0382be8 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -36,8 +36,8 @@ $routes->addPlaceholder('uuid', '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4} $routes->get('/', 'Home::index'); $routes->get('/login', 'AuthController::login'); -$routes->post('/signin', 'AuthController::signin/local'); -$routes->get('/signin/(:alpha)', 'AuthController::signin/$1'); +$routes->post('/signup', 'AuthController::signup/local'); +$routes->get('/signup/(:alpha)', 'AuthController::signup/$1'); $routes->get('/logout', 'AuthController::logout'); $routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) { }); diff --git a/app/Controllers/AuthController.php b/app/Controllers/AuthController.php index a3d421b..14769f9 100644 --- a/app/Controllers/AuthController.php +++ b/app/Controllers/AuthController.php @@ -55,11 +55,11 @@ class AuthController extends BaseController return view('auth/login', $this->_viewDatas); } - public function signin(string $site) + public function signup(string $site) { try { //각 Adapter별 인층체크 후 Session에 인증정보 설정 - $this->getAdapter($site)->signin($this->request->getVar()); + $this->getAdapter($site)->signup($this->request->getVar()); $return_url = $this->_session->get(SESSION_NAMES['RETURN_URL']) ?: "/"; return redirect()->to($this->request->getVar(SESSION_NAMES['RETURN_URL']) ?: $return_url); } catch (\Exception $e) { diff --git a/app/Controllers/CLI/HPILO/HPILO4.php b/app/Controllers/CLI/HPILO/HPILO.php similarity index 91% rename from app/Controllers/CLI/HPILO/HPILO4.php rename to app/Controllers/CLI/HPILO/HPILO.php index bb98bec..25b5fca 100644 --- a/app/Controllers/CLI/HPILO/HPILO4.php +++ b/app/Controllers/CLI/HPILO/HPILO.php @@ -4,8 +4,9 @@ namespace App\Controllers\CLI\HPILO; use App\Models\HPILOModel; use App\Entities\HPILOEntity; +use App\Libraries\API\HPILO\HPILO4; -class HPILO4 +class HPILO { private $_adapter = null; private function getAdapter(HPILOEntity $entity) @@ -25,8 +26,8 @@ class HPILO4 //transation처리 // $this->getAuthModel()->db->transBegin(); foreach ($entitys as $entity) { - $ilo = new \App\Libraries\HPILO\HPILO4($this->getAdapter($entity)); - $entity = $ilo->refresh($entity); + $ilo = new HPILO4($this->getAdapter($entity)); + $entity = $ilo->reload($entity); if ($entity->hasChanged()) { if (!$model->save($entity)) { log_message("error", __FUNCTION__ . "에서 호출:" . $model->getLastQuery()); diff --git a/app/Libraries/Adapter/Auth/Adapter.php b/app/Libraries/Adapter/Auth/Adapter.php index 0497d75..83ed02a 100644 --- a/app/Libraries/Adapter/Auth/Adapter.php +++ b/app/Libraries/Adapter/Auth/Adapter.php @@ -28,7 +28,7 @@ abstract class Adapter return ucfirst($this->_site); } abstract public function getAuthButton(); - abstract public function signin(array $formDatas): UserEntity; + abstract public function signup(array $formDatas): UserEntity; final protected function getUserModel(): UserModel { @@ -46,7 +46,7 @@ abstract class Adapter return $this->_userSNSModel; } - protected function signin_process(UserEntity $entity): void + protected function signup_process(UserEntity $entity): void { $this->_session->set(SESSION_NAMES['ISLOGIN'], true); $auths = []; diff --git a/app/Libraries/Adapter/Auth/GoogleAdapter.php b/app/Libraries/Adapter/Auth/GoogleAdapter.php index 8d006d3..c7ebfa8 100644 --- a/app/Libraries/Adapter/Auth/GoogleAdapter.php +++ b/app/Libraries/Adapter/Auth/GoogleAdapter.php @@ -57,7 +57,7 @@ class GoogleAdapter extends Adapter return $button; } - public function signin(array $formDatas): UserEntity + public function signup(array $formDatas): UserEntity { try { //Google 접근 권한 설정. @@ -122,7 +122,7 @@ class GoogleAdapter extends Adapter } //인증된 사용자 정보를 가져온후 로그인처리 $entity = $this->getUserModel()->getEntity($snsEntity->user_id); - $this->signin_process($entity); + $this->signup_process($entity); return $entity; } catch (\Exception $e) { throw new \Exception("관리자에게 문의하시기 바랍니다.
{$e->getMessage()}"); diff --git a/app/Libraries/Adapter/Auth/LocalAdapter.php b/app/Libraries/Adapter/Auth/LocalAdapter.php index a4052b8..6e8089e 100644 --- a/app/Libraries/Adapter/Auth/LocalAdapter.php +++ b/app/Libraries/Adapter/Auth/LocalAdapter.php @@ -16,7 +16,7 @@ class LocalAdapter extends Adapter return ""; } - public function signin(array $formDatas): UserEntity + public function signup(array $formDatas): UserEntity { if (!isset($formDatas['id']) || !$formDatas['id'] || !isset($formDatas['passwd']) || !$formDatas['passwd']) { throw new \Exception("ID 나 암호의 값이 없습니다."); @@ -26,7 +26,7 @@ class LocalAdapter extends Adapter throw new \Exception("암호가 맞지않습니다."); } //Session에 인증정보 설정 - $this->signin_process($entity); + $this->signup_process($entity); return $entity; } }