dboho/oauth2-server-pdo

Implementation of thephpleague oauth2 server storage interfaces for PDO storage

v0.7.5 2024-08-07 10:50 UTC

This package is auto-updated.

Last update: 2025-01-07 11:48:43 UTC


README

Travis branch Codecov Software License

This is an Implentation of the thephpleague/oauth2-server storage interfaces for PDO Storage.

Usage

$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
);
//…

Installation

The recommended installation method is via Composer.

In your project root just run:

$ composer require dboho/oauth2-server-pdo