Posts

Login CakePHP 4 script

CakePHP 4 , login biasanya menggunakan Authentication plugin . Berikut alurnya: 1. Install Authentication Plugin Jalankan di terminal: composer require cakephp/authentication 2. Load Plugin di Application.php Di file src/Application.php , tambahkan: $this->addPlugin('Authentication'); 3. Middleware Authentication Masih di Application.php , tambahkan ke middleware() : use Authentication\Middleware\AuthenticationMiddleware; $middlewareQueue->add(new AuthenticationMiddleware($this)); 4. Konfigurasi Authentication Di src/Application.php , dalam method getAuthenticationService() : use Authentication\AuthenticationService; use Authentication\AuthenticationServiceInterface; use Authentication\Identifier\IdentifierInterface; use Authentication\Middleware\AuthenticationMiddleware; use Psr\Http\Message\ServerRequestInterface; public function getAuthenticationService(ServerRequestInterface $request): AuthenticationServiceInterface { $service = new Authenticatio...

Setup dual boot window 7 and ubuntu