dboho/oauth2-server-pdo

Implementation of thephpleague oauth2 server storage interfaces for PDO storage

v0.7.4 2020-07-22 08:37 UTC

This package is auto-updated.

Last update: 2024-04-22 18:30:52 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