Automation/app/Libraries/Auth/LocalLibrary.php
2024-09-09 16:41:45 +09:00

35 lines
949 B
PHP

<?php
namespace App\Libraries\Auth;
use App\Entities\UserEntity;
use App\Libraries\Adapter\Auth\AuthLibrary;
class LocalLibrary extends AuthLibrary
{
public function __construct(string $site, $debug = false)
{
parent::__construct($site, $debug);
}
public function getAuthButton()
{
return "";
}
public function execute(): UserEntity
{
return new UserEntity();
// $formDatas = $this->getFormDatas();
// if (!isset($formDatas['id']) || !$formDatas['id'] || !isset($formDatas['passwd']) || !$formDatas['passwd']) {
// throw new \Exception("ID 나 암호의 값이 없습니다.");
// }
// $entity = $this->getUserModel()->getEntity(['id' => $formDatas['id'], 'status' => DEFAULTS['STATUS']]);
// if (!password_verify($formDatas['passwd'], $entity->passwd)) {
// throw new \Exception("암호가 맞지않습니다.");
// }
// //Session에 인증정보 설정
// return $this->setSession_process($entity);;
}
}