symfony-bundle oauth-server-bundle
koenreiniers/oauth-server-bundle
- Thursday, April 28, 2016
- by koenreiniers
- Repository
- 1 Watchers
- 0 Stars
- 47 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 2 % Grown
Installation
Add to routing.yml:
kr_oauth_server:
resource: "@KrOAuthServerBundle/Controller"
type: annotation, (*1)
Add to config.yml:
kr_oauth_server:
classmap:
access_token: AcmeBundle\Entity\AccessToken
refresh_token: AcmeBundle\Entity\RefreshToken
client: AcmeBundle\Entity\Client
authorization_code: AcmeBundle\Entity\AuthorizationCode, (*2)
Add to security.yml:
oauth_token:
pattern: ^/oauth/token
stateless: true
grant_request: true
oauth_auth:
pattern: ^/oauth/auth
form_login:
provider: fos_userbundle
csrf_token_generator: security.csrf.token_manager
check_path: /oauth/auth/login_check
logout: true
anonymous: true
oauth_resource:
pattern: ^/api/v1
stateless: true
oauth: true