borisguery/oauth2-server-storage-dbal

0.1 2016-04-04 16:56 UTC

This package is not auto-updated.

Last update: 2024-09-20 19:50:33 UTC


README

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

用于 Symfony 的 OAuth2 服务器包

安装

通过 Composer

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

配置

以下是需要覆盖以更改默认表名的键。

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

用法

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

就这样!

测试

$ composer test

贡献

有关详细信息,请参阅 CONTRIBUTING

安全

如果您发现任何与安全相关的问题,请通过电子邮件 guery.b@gmail.com 而不是使用问题跟踪器。

致谢

许可

MIT 许可证 (MIT)。有关更多信息,请参阅 许可文件