Newscoop\NewscoopBundle\Security\Http\Authentication\AuthenticationFrontendSuccessHandler::onAuthenticationSuccess PHP Метод

onAuthenticationSuccess() публичный Метод

This is called when an interactive authentication attempt succeeds. This is called by authentication listeners inheriting from AbstractAuthenticationListener.
public onAuthenticationSuccess ( Request $request, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) : Response
$request Symfony\Component\HttpFoundation\Request
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface
Результат Symfony\Component\HttpFoundation\Response
    public function onAuthenticationSuccess(Request $request, TokenInterface $token)
    {
        $user = $token->getUser();
        $zendAuth = \Zend_Auth::getInstance();
        $this->authAdapter->setEmail($user->getEmail())->setPassword($request->request->get('password'));
        $zendAuth->authenticate($this->authAdapter);
        $OAuthtoken = $this->userService->loginUser($user, 'oauth_authorize');
        $session = $request->getSession();
        $session->set('_security_oauth_authorize', serialize($OAuthtoken));
        $this->setNoCacheCookie($request);
        return parent::onAuthenticationSuccess($request, $token);
    }
AuthenticationFrontendSuccessHandler