borisguery/oauth2-server-storage-dbal

0.1 2016-04-04 16:56 UTC

This package is not auto-updated.

Last update: 2024-11-15 20:37:01 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

OAuth2 Server Bundle for Symfony

Install

Via Composer

$ composer require borisguery/oauth2-server-storage-dbal

Configuration

Here are the keys to override if you wish to change the default table names.

$tableConfiguration = new TableConfiguration(
    [
            'oauth2_clients'        => 'oauth2_clients',
            'oauth2_access_tokens'  => 'oauth2_access_tokens',
            'oauth2_refresh_tokens' => 'oauth2_refresh_tokens',
    ]
);

Usage

$accessTokenStorage  = new DbalAccessTokenStorage($dbalConnection, $tableConfiguration);
$refreshTokenStorage = new DbalRefreshTokenStorage($dbalConnection, $tableConfiguration);
$clientStorage       = new DbalClientStorage($dbalConnection, $tableConfiguration);

that's it!

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email guery.b@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.