PHP code example of dboho / oauth2-server-pdo
1. Go to this page and download the library: Download dboho/oauth2-server-pdo 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/ */
dboho / oauth2-server-pdo example snippets
$pdo = new PDO('sqlite:oauth2.db');
$sessionStorage = new SessionStorage($pdo);
$accessTokenStorage = new AccessTokenStorage($pdo);
$clientStorage = new ClientStorage($pdo);
$scopeStorage = new ScopeStorage($pdo);
$server = new ResourceServer(
$sessionStorage,
$accessTokenStorage,
$clientStorage,
$scopeStorage
);
//…