I've developed an APIRest service to consume data from a mobile app. I've used the Symfony2 bundles: FOSOAuthServerBundle, FOSUserBundle and FOSRestBundle and all work fine but I need to differenciate the admin panel users and the api users because now if I try to authenticate with an admin from app, I will obtain a token however I only want to get a valid one with api users.
For example, with the next users I should get a valid token with the second request and an invalid grant response with the first but I obtain a valid token with both of them:
adminuser (ROLE_ADMIN)
appuser (ROLE_APP)
Thanks a lot for put me on the correct way to solve this and sorry for my english.