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

Return true when trusted computer feature is enabled.
public useTrustedOption ( ) : boolean
Результат boolean
Пример #1
0
 /**
  * Check if user is on a trusted computer, otherwise call TwoFactorProviderRegistry.
  *
  * @param AuthenticationContextInterface $context
  */
 public function beginAuthentication(AuthenticationContextInterface $context)
 {
     $request = $context->getRequest();
     $user = $context->getUser();
     $context->setUseTrustedOption($this->useTrustedOption);
     // Skip two-factor authentication on trusted computers
     if ($context->useTrustedOption() && $this->cookieManager->isTrustedComputer($request, $user)) {
         return;
     }
     $this->authHandler->beginAuthentication($context);
 }
Пример #2
0
 public function render(AuthenticationContextInterface $context)
 {
     return $this->templating->renderResponse($this->formTemplate, array('useTrustedOption' => $context->useTrustedOption()));
 }