summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-11-01 12:23:11 +0300
committerAndrew Dolgov <[email protected]>2019-11-01 12:23:11 +0300
commit88cd9e586e2e0d0ccea745018ba2f9a91e04ec93 (patch)
treed74bb86bf6c730196da6ef0a318f2f153dcb3a3d /classes
parent84e9f1d5ccec90103a3decb7069884342f73fdfb (diff)
add placeholder UI plumbing for app passwords
Diffstat (limited to 'classes')
-rw-r--r--classes/pref/prefs.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php
index 1cf751b62..d9482b966 100644
--- a/classes/pref/prefs.php
+++ b/classes/pref/prefs.php
@@ -395,6 +395,14 @@ class Pref_Prefs extends Handler_Protected {
print "</form>";
print "</div>"; # content pane
+ print "<div dojoType='dijit.layout.ContentPane' title=\"".__('App passwords')."\">";
+
+ print_notice("You can create separate passwords for API clients. Using one is required if you enable OTP.");
+
+
+
+ print "</div>"; # content pane
+
print "<div dojoType='dijit.layout.ContentPane' title=\"".__('One time passwords / Authenticator')."\">";
if ($_SESSION["auth_module"] == "auth_internal") {
@@ -442,14 +450,16 @@ class Pref_Prefs extends Handler_Protected {
} else {
print_warning("You will need a compatible Authenticator to use this. Changing your password would automatically disable OTP.");
-
- print_notice("Scan the following code by the Authenticator application or use OTP key (below).");
+ print_notice("You will also need to create a separate App password for API clients if you enable OTP.");
if (function_exists("imagecreatefromstring")) {
+ print "<h3>" . __("Scan the following code by the Authenticator application or copy the key manually:") . "</h3>";
+
$csrf_token = $_SESSION["csrf_token"];
print "<img alt='otp qr-code' src='backend.php?op=pref-prefs&method=otpqrcode&csrf_token=$csrf_token'>";
} else {
print_error("PHP GD functions are required to generate QR codes.");
+ print "<h3>" . __("Use the following OTP key with a compatible Authenticator application:") . "</h3>";
}
print "<form dojoType='dijit.form.Form' id='changeOtpForm'>";