/** * @param Request $request * @param null|AuthenticationException $authException * @return Response */ public function start(Request $request, AuthenticationException $authException = null) { $action = $this->config['login_action']; $manager = $this->factory->getManager($this->config['manager'], $request->getUriForPath($this->config['check_path'])); if ($action) { return $this->httpKernel->forward($action, array('manager' => $manager, 'request' => $request, 'exception' => $authException)); } return new RedirectResponse($manager->getServer()->getLoginUrl()); }
/** * @param Request $request * @param null|AuthenticationException $authException * * @return Response */ public function onLogoutSuccess(Request $request) { $action = $this->config['logout_action']; $manager = $this->factory->getManager($this->config['manager'], $request->getUriForPath($this->config['check_path'])); if ($action) { return $this->httpKernel->forward($action, array('manager' => $manager, 'request' => $request)); } return new RedirectResponse($manager->getServer()->getLogoutUrl()); }