Open VincentLanglet opened 1 month ago
Hi @mtarld, seems like you're the one who wrote the OAuth2Authenticator
in https://github.com/thephpleague/oauth2-server-bundle/pull/24 maybe you could help me on the choice to send
new Response('', 401, ['WWW-Authenticate' => 'Bearer']);
rather than an AuthenticationException ?
Hi @chalasr ,
This bundle is great and simplify the integration of oauth. Thanks a lot. But I ended up with some questions.
We're having our firewall config done this way:
And I discovered that if I try to reach
v2/foo
route, I get errors logand
Re-reading the doc, I think it's because I was missing
oauth2: true
on theapi_oauth
firewall, this option seems to use theOAuth2Authenticator
and solve the "No Authentication entry point configured" error. But I soon as I use this option, the page go fromto
I assume it's because of the code
Wouldn't it better to still have the symfony-profiler/debug tools in debug mode ? Is it possible ? Also, why my custom 401 error page is not used ?
Wouldn't it better to rely on Symfony Exception listener and throw an
AuthenticationException
in the start method rather thanSomething like a
OAuth2AuthenticationException
?