Support 2fa

This commit is contained in:
Sheng
2019-07-07 14:52:43 +08:00
parent c0eba0ebb3
commit d197133c95
5 changed files with 202 additions and 9 deletions
+4 -3
View File
@@ -517,7 +517,7 @@ jQuery(function($){
function clean_data(data) {
var i, attr, val;
var attrs = fields.concat(['password', 'privatekey', 'passphrase']);
var attrs = fields.concat(['password', 'privatekey', 'passphrase', 'totp']);
for (i = 0; i < attrs.length; i++) {
attr = attrs[i];
@@ -668,7 +668,7 @@ jQuery(function($){
}
function connect(hostname, port, username, password, privatekey, passphrase) {
function connect(hostname, port, username, password, privatekey, passphrase, totp) {
// for console use
var result, opts;
@@ -687,7 +687,8 @@ jQuery(function($){
username: username,
password: password,
privatekey: privatekey,
passphrase: passphrase
passphrase: passphrase,
totp: totp
};
} else {
opts = hostname;