diff options
author | Cornelius Kölbel <cornelius.koelbel@netknights.it> | 2016-11-14 15:39:19 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-01-11 11:01:52 +0100 |
commit | e077e01bf2f2ead37c664e6e1f7339bb3a1d7f85 (patch) | |
tree | b168d6b39ab009421fe5b69e4b895b8a18e853b3 /core/templates/twofactorshowchallenge.php | |
parent | c4e51fd0557728a18a689d1160e00a09dfc6e789 (diff) | |
download | nextcloud-server-e077e01bf2f2ead37c664e6e1f7339bb3a1d7f85.tar.gz nextcloud-server-e077e01bf2f2ead37c664e6e1f7339bb3a1d7f85.zip |
Add a TwoFactorException
A Two Factor third party App may throw a TwoFactorException()
with a more detailed error message in case the authentication fails.
The 2FA Controller will then display the message of this Exception
to the user.
Working on #26593
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'core/templates/twofactorshowchallenge.php')
-rw-r--r-- | core/templates/twofactorshowchallenge.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/templates/twofactorshowchallenge.php b/core/templates/twofactorshowchallenge.php index 20b92be9520..4f3741b5dfe 100644 --- a/core/templates/twofactorshowchallenge.php +++ b/core/templates/twofactorshowchallenge.php @@ -3,6 +3,8 @@ /** @var $_ array */ /* @var $error boolean */ $error = $_['error']; +/* @var $error_message string */ +$error_message = $_['error_message']; /* @var $provider OCP\Authentication\TwoFactorAuth\IProvider */ $provider = $_['provider']; /* @var $template string */ @@ -12,7 +14,11 @@ $template = $_['template']; <div class="warning"> <h2 class="two-factor-header"><?php p($provider->getDisplayName()); ?></h2> <?php if ($error): ?> - <p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p> + <?php if($error_message): ?> + <p><strong><?php p($error_message); ?></strong></p> + <?php else: ?> + <p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p> + <?php endif; ?> <?php endif; ?> <?php print_unescaped($template); ?> </div> |