6

I am using Data-Dog/Auditbundle for AuditLogs in my symfony application.Also I have TokenAuthenticator as my guard for api's. But bundle's EventSubscriber is being called before TokenAuthenticator and hence

public function __construct(TokenStorageInterface $securityTokenStorage)
{
    $this->securityTokenStorage = $securityTokenStorage;
}

this in EventSubscriber gives token as null and I am not able to getUser.

Mikhail Prosalov
  • 4,155
  • 4
  • 29
  • 41
Vipulw
  • 1,253
  • 5
  • 12
  • Can you show up your security.yaml? Especially the firewall covering the path for which the issue occurs, and the `access_controls`. Also I guess you are using Symfony 4.4 or higher, can you confirm? – chalasr Dec 11 '19 at 03:50
  • Thanks! It worked by overriding default EventSubscriber of Bundle by my own EventSubscriber and extend few other functionalities in it. – Vipulw Dec 11 '19 at 12:43

0 Answers0