You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could use this workaround, or create special listener class, but I'm sure it should be done by symfony itself.
// workaround for every route which uses non default formatif (!$this->get('security.context')->isGranted('ROLE_USER')) {
$pars = $this->getRequest()->attributes->get('_route_params');
returnnewRedirectResponse($this->generateUrl('login', array('_format' => $pars['_format'])));
}