summaryrefslogtreecommitdiffstats
path: root/core/templates/twofactorshowchallenge.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2016-08-29 19:19:44 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-09-05 08:51:13 +0200
commit8acb734854484e2ffd235929f6e7d0ba4c273844 (patch)
tree3269bc6cc60b51d4fd507d91e8eca3a4ecc262cd /core/templates/twofactorshowchallenge.php
parent8b484eedf029b8e1a9dcef0efb09db381888c4b0 (diff)
downloadnextcloud-server-8acb734854484e2ffd235929f6e7d0ba4c273844.tar.gz
nextcloud-server-8acb734854484e2ffd235929f6e7d0ba4c273844.zip
add 2fa backup codes app
* add backup codes app unit tests * add integration tests for the backup codes app
Diffstat (limited to 'core/templates/twofactorshowchallenge.php')
-rw-r--r--core/templates/twofactorshowchallenge.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/templates/twofactorshowchallenge.php b/core/templates/twofactorshowchallenge.php
index fb161921675..197de8a288e 100644
--- a/core/templates/twofactorshowchallenge.php
+++ b/core/templates/twofactorshowchallenge.php
@@ -16,4 +16,12 @@ $template = $_['template'];
<?php endif; ?>
<?php print_unescaped($template); ?>
</div>
-<a class="two-factor-cancel" <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel log in')) ?></a>
+<a class="two-factor-link" <?php print_unescaped($_['logout_attribute']); ?>><?php p($l->t('Cancel log in')) ?></a>
+<?php if (!is_null($_['backupProvider'])): ?>
+<a class="two-factor-link" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
+ [
+ 'challengeProviderId' => $_['backupProvider']->getId(),
+ 'redirect_url' => $_['redirect_url'],
+ ]
+ )) ?>"><?php p($l->t('Use backup code')) ?></a>
+<?php endif;