michalkvasnicak / oauth2-server-mongodb-bundle
MongoDB模型层,用于OAuth 2.0服务器捆绑包
dev-develop
2014-10-27 15:06 UTC
Requires
- php: >=5.4
- doctrine/mongodb-odm-bundle: ~3.0
- michalkvasnicak/oauth2-server-bundle: dev-develop
- symfony/security-bundle: ~2.5
Requires (Dev)
- mockery/mockery: ~0.9.1
- phpunit/php-code-coverage: ~2.0
- phpunit/phpunit: ~4.2
- satooshi/php-coveralls: 0.6.1
This package is not auto-updated.
Last update: 2024-09-24 00:41:26 UTC
README
用于Symfony 2框架的OAuth 2.0服务器捆绑包的模型层。
需求
- PHP >= 5.4
- doctrine/mongodb-odm-bundle: ~3.0
- symfony/security-bundle: >= ~2.5
- michalkvasnicak/oauth2-server-bundle: dev-develop
安装
使用composer
{ "require": { "michalkvasnicak/oauth2-server-mongodb-bundle": "dev-develop" } }
配置
默认Doctrine ODM文档
要使用此捆绑包中的默认文档,只需在AppKernel.php
中启用捆绑包。
自定义Doctrine ODM文档
如果您想创建自己的文档,则创建扩展此捆绑包中的抽象类的文档,并配置此捆绑包。
o_auth2_server_mongodb: document_classes: access_token: 'FQN of Access Token Doctrine ODM document' authorization_code: 'FQN of Authorization code Doctrine ODM document' client: 'FQN of Client Doctrine ODM document' refresh_token: 'FQN of Refresh Token Doctrine ODM document' user: 'FQN of User Doctrine ODM document' repository_classes: access_token: 'FQN of Access Token Doctrine ODM document repository' authorization_code: 'FQN of Authorization code Doctrine ODM document repository' client: 'FQN of Client Doctrine ODM document repository' refresh_token: 'FQN of Refresh Token Doctrine ODM document repository' user: 'FQN of User Doctrine ODM document repository' # scope document and repository is not defined because it is used only by other documents # but Scope has to implement OAuth2\Storage\IScope interface!