public function setBegin($provider, $token) { $sessionFlag = $this->getSessionFlag($provider, $token); $this->session->set($sessionFlag, false); }
/** * Iterate over two-factor providers and begin the two-factor authentication process * * @param \Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContext $context */ public function beginAuthentication(AuthenticationContext $context) { foreach ($this->providers as $providerName => $provider) { if ($provider->beginAuthentication($context)) { $this->flagManager->setBegin($providerName, $context->getToken()); } } }