I retrieve an access token using the client_credentials grant type. Then I try to access a protected resource using this access token, but then I always get the error HttpException : Full authentication is required to access this resource.
I'm wondering if I set up my config wrongly. Here's my fos_auth_server.yaml:
What's also interesting is that when I get an access token based on client_credentials, then of course that access token is not connected to any user. So I'm wondering if maybe Symfony is throwing that exception, because no user can be found. If that's the case, how can I configure Symfony that it's okay if no user can be found?
@Evertt I'm curious if you find a solution ?
I am currently thinking about a way to authenticate a PHP application accessing a PHP API. The client_credentials grant type seems the way to go in my case.
I retrieve an access token using the
client_credentials
grant type. Then I try to access a protected resource using this access token, but then I always get the errorHttpException : Full authentication is required to access this resource
.I'm wondering if I set up my config wrongly. Here's my
fos_auth_server.yaml
:And here's my
security.yaml
:What's also interesting is that when I get an access token based on
client_credentials
, then of course that access token is not connected to any user. So I'm wondering if maybe Symfony is throwing that exception, because no user can be found. If that's the case, how can I configure Symfony that it's okay if no user can be found?