dbms/app/Controllers/Auth/LocalController.php
2025-05-23 13:42:48 +09:00

39 lines
1.0 KiB
PHP

<?php
namespace App\Controllers\Auth;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
use App\Entities\UserEntity;
use App\Services\Auth\LocalService;
class LocalController extends AuthController
{
private $_service = null;
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
}
final public function getService(): LocalService
{
if (!$this->_service) {
$this->_service = new LocalService($this->request);
}
return $this->_service;
}
public function getSNSButton(): string
{
return "";
}
//로그인처리
protected function login_process(): UserEntity
{
$this->init(__FUNCTION__);
$this->formDatas = $this->doValidate($this->action, $this->fields);
return $this->getService()->login($this->getService()->checkUser($this->formDatas));
}
}