OTP support
This commit is contained in:
@@ -142,7 +142,9 @@ select.interface {
|
||||
function auth(pid) {
|
||||
ajax({action: "auth-user-pass", params:{session: pid,
|
||||
user:$('#auth_'+pid+'>input.user').val(),
|
||||
password:$('#auth_'+pid+'>input.pass').val()}});
|
||||
password:$('#auth_'+pid+'>input.pass').val(),
|
||||
otp:$('#auth_'+pid+'>input.otp').val()
|
||||
}});
|
||||
}
|
||||
|
||||
function refresh(data) {
|
||||
@@ -201,11 +203,16 @@ select.interface {
|
||||
line += '</td>\n';
|
||||
line += '</tr>\n';
|
||||
|
||||
if(infos['status']=="Need Password") {
|
||||
if(infos['status'].startsWith("Need")) {
|
||||
line +='<tr><td colspan="4">';
|
||||
line +='<form id="auth_'+pid+'" action="#" onsubmit="auth('+pid+') ; return false" >';
|
||||
line +='<input class="user" placeholder="Enter login" size="15">';
|
||||
line +='<input type="password" placeholder="Password" size="15" class="pass">';
|
||||
if (infos['status'].includes("Password")) {
|
||||
line +='<input class="user" placeholder="Enter login" size="15">';
|
||||
line +='<input type="password" placeholder="Password" size="15" class="pass">';
|
||||
}
|
||||
if (infos['status'].includes("OTP")) {
|
||||
line +='<input class="otp" placeholder="'+infos["message"]+'" size="15">';
|
||||
}
|
||||
line +='<input type="submit" value="G0">';
|
||||
line +='</form>';
|
||||
line +='</td></tr>\n';
|
||||
|
||||
Reference in New Issue
Block a user