Reputation: 11
I am passing an argument from services.yml to an authentication handler, and getting this error:
....must be an instance of Symfony\Component\Security\Http\HttpUtils
This is the class:
class AuthenticationFailure extends DefaultAuthenticationFailureHandler
{
public function onAuthenticationFailure(Request $request, AuthenticationException $exception)
{
I have tried all of these but none work:
What am I missing?
So I just need to know what service do I pass that is an instance of Symfony\Component\Security\Http\HttpUtils
Upvotes: 1
Views: 451
Reputation: 380
Try this:
services:
http.utils.class:
class: Symfony\Component\Security\Http\HttpUtils
security.authentication.your_success_handler:
class: %security.authentication.success_handler.class%
public: false
arguments: [@http.utils.class, [], ...]
Upvotes: 1