spomky-labs / oauth2-server-scope-manager-bundle
v5.0.1
2015-06-15 20:27 UTC
Requires
- php: >=5.3.3
- spomky-labs/oauth2-server-exception-manager-bundle: ~5.0.0
- spomky-labs/oauth2-server-scope-manager: ~5.0.0
Requires (Dev)
- behat/behat: 3.*
- behat/symfony2-extension: *
- symfony/class-loader: ~2.3
- symfony/yaml: ~2.3
This package is not auto-updated.
Last update: 2015-08-17 10:43:29 UTC
README
此包为您的 OAuth2 服务器提供简单的范围管理器。
它依赖于 OAuth2 接口项目。
发布流程
发布流程 在此描述。
先决条件
此包需要至少 PHP 5.4 和 Symfony v2.3。
它已成功测试使用以下版本:
- PHP:
PHP 5.4到PHP 5.6,PHP 7和HHVM。 - Symfony:
v2.3.x到v2.7.x。
安装
安装此库的首选方法是依赖 Composer
composer require "spomky-labs/oauth2-server-scope-manager-bundle" "~5.0.0"
启用包
在内核中启用包
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
...
new SpomkyLabs\OAuth2ServerScopeManagerBundle\SpomkyLabsOAuth2ServerScopeManagerBundle(),
);
}
配置
sl_oauth2_scope_manager:
policy: default # Available policies:
# - 'default': uses default_scope if no scope is requested,
# - 'error': throws an error if no scope is requested,
# - null (default): no scope policy
default_scope: scope1 scope2 # These scopes will be set if the policy is 'default' and no scope is requested (default: null)
available_scope: scope1 scope2 scope3 scope4 # Scopes supported by the server (default: null)
使用方法
您只需要注入此包提供的管理器: sl_oauth2_scope_manager.manager。
贡献
欢迎提出新功能、错误修复以及其他使此包有用的想法。请 遵循这些最佳实践。
许可证
此包在 MIT 许可证 下发布。