summaryrefslogtreecommitdiffstats
path: root/settings/templates
diff options
context:
space:
mode:
Diffstat (limited to 'settings/templates')
-rw-r--r--settings/templates/settings/personal/security.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/settings/templates/settings/personal/security.php b/settings/templates/settings/personal/security.php
index 6dd0e8d3cef..6b2c37b6a88 100644
--- a/settings/templates/settings/personal/security.php
+++ b/settings/templates/settings/personal/security.php
@@ -101,3 +101,38 @@ if($_['passwordChangeSupported']) {
</div>
</div>
</div>
+
+<div id="two-factor-auth" class="section">
+ <h2><?php p($l->t('Two-Factor Authentication'));?></h2>
+ <p class="settings-hint">
+ <?php
+ if ($_['twoFactorProviderData']['enabled']) {
+ p($l->t('Two-factor authentication is enabled on your account.'));
+ } else {
+ p($l->t('Two-factor authentication is disabled on your account.'));
+ }
+ ?>
+ </p>
+ <ul>
+ <?php foreach ($_['twoFactorProviderData']['providers'] as $data) { ?>
+ <li>
+ <?php
+ /** @var \OCP\Authentication\TwoFactorAuth\IProvidesPersonalSettings $provider */
+ $provider = $data['provider'];
+ if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
+ $icon = $provider->getDarkIcon();
+ } else {
+ $icon = image_path('core', 'actions/password.svg');
+ }
+ /** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */
+ $settings = $data['settings'];
+ ?>
+ <h3>
+ <img class="two-factor-provider-settings-icon" src="<?php p($icon) ?>" alt="">
+ <?php p($provider->getDisplayName()) ?>
+ </h3>
+ <?php print_unescaped($settings->getBody()->fetchPage()) ?>
+ </li>
+ <?php } ?>
+ </ul>
+</div>