oauth2-server-bundle
oauth2-server-bundle copied to clipboard
oauth2: true gets ignored.
behind firewalls i added api: pattern: ^/api security: true stateless: true oauth2: true
This basically does nothing. Is there any fix for this? this library is not usable in the current state
luckily i asked around on symfony slack channel and some guys were able to help me sort this out. depending on your set up you would need a line on access_control in security.yaml
- { path: /api/test, role: ROLE_OAUTH2_EMAIL }
Would be nice if the documentation could specify this.
Thanks for sharing your solution.
Would be nice if the documentation could specify this.
I agree. Looks like an easy pick, PR welcome.
I hope this helps anyone person looking this up or adding it to the docs.
The pattern in security.yaml
as far as I understand is ROLE_OAUTH2_<SCOPE>
. So if you have a client with scope user
, email
or abc
then the corresponding access control roles would be: ROLE_OAUTH2_USER
, ROLE_OAUTH2_EMAIL
, ROLE_OAUTH2_ABC
.
It definitely should be in docs.