Model layer for OAuth 2.0 server bundle for Symfony 2 framework.
- PHP >= 5.4
- doctrine/mongodb-odm-bundle: ~3.0
- symfony/security-bundle: >= ~2.5
- michalkvasnicak/oauth2-server-bundle: dev-develop
Using composer
{
"require": {
"michalkvasnicak/oauth2-server-mongodb-bundle": "dev-develop"
}
}
To use default documents from this bundle just enable bundle in AppKernel.php
.
If you want to create your own documents then create documents that are extending abstract classes from this bundle and configure this bundle.
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!