1. Go to this page and download the library: Download cakedc/cakephp-oauth-server library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cakedc / cakephp-oauth-server example snippets
public function bootstrap(): void
{
parent::bootstrap();
$this->addPlugin('CakeDC/OAuthServer');
}
use CakeDC\OAuthServer\OAuthServer;
use Cake\Http\Middleware\CsrfProtectionMiddleware;
use Psr\Http\Message\ServerRequestInterface;
$csrf = new CsrfProtectionMiddleware();
$csrf->skipCheckCallback(fn (ServerRequestInterface $request): bool => OAuthServer::csrfSkip($request));
$middlewareQueue->add($csrf);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.