You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

twofactorshowchallenge.php 1.0KB

123456789101112131415161718192021222324252627
  1. <?php
  2. /** @var $l \OCP\IL10N */
  3. /** @var $_ array */
  4. /* @var $error boolean */
  5. $error = $_['error'];
  6. /* @var $provider OCP\Authentication\TwoFactorAuth\IProvider */
  7. $provider = $_['provider'];
  8. /* @var $template string */
  9. $template = $_['template'];
  10. ?>
  11. <div class="warning">
  12. <h2 class="two-factor-header"><?php p($provider->getDisplayName()); ?></h2>
  13. <?php if ($error): ?>
  14. <p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p>
  15. <?php endif; ?>
  16. <?php print_unescaped($template); ?>
  17. </div>
  18. <a class="two-factor-link" <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel log in')) ?></a>
  19. <?php if (!is_null($_['backupProvider'])): ?>
  20. <a class="two-factor-link" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
  21. [
  22. 'challengeProviderId' => $_['backupProvider']->getId(),
  23. 'redirect_url' => $_['redirect_url'],
  24. ]
  25. )) ?>"><?php p($l->t('Use backup code')) ?></a>
  26. <?php endif;