mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 12:52:54 -05:00
add duo authentication support (#6609)
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
@@ -193,6 +193,7 @@
|
||||
<input style="display:none;float:right" id=emailKeyButton type=button value="Email" onclick="useEmailToken(1)" />
|
||||
<input style="display:none;float:right" id=smsKeyButton type=button value="SMS" onclick="useSMSToken(1)" />
|
||||
<input style="display:none;float:right" id=msgKeyButton type=button value="Messaging" onclick="useMsgToken(1)" />
|
||||
<input style="display:none;float:right" id=duoKeyButton type=button value="Duo" onclick="useDuoToken(1)" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -221,6 +222,7 @@
|
||||
<input style="display:none;float:right" id=emailKeyButton2 type=button value="Email" onclick="useEmailToken(2)" />
|
||||
<input style="display:none;float:right" id=smsKeyButton2 type=button value="SMS" onclick="useSMSToken(2)" />
|
||||
<input style="display:none;float:right" id=msgKeyButton2 type=button value="Messaging" onclick="useMsgToken(2)" />
|
||||
<input style="display:none;float:right" id=duoKeyButton2 type=button value="Duo" onclick="useDuoToken(2)" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -337,6 +339,7 @@
|
||||
var webPageFullScreen = true;
|
||||
var nightMode = (getstore('_nightMode', '0') == '1');
|
||||
var publicKeyCredentialRequestOptions = null;
|
||||
var otpduo = (decodeURIComponent('{{{otpduo}}}') === 'true');
|
||||
var otpemail = (decodeURIComponent('{{{otpemail}}}') === 'true');
|
||||
var otpsms = (decodeURIComponent('{{{otpsms}}}') === 'true');
|
||||
var otpmsg = (decodeURIComponent('{{{otpmsg}}}') === 'true');
|
||||
@@ -474,6 +477,7 @@
|
||||
QV('emailKeyButton', otpemail && (messageid != 2) && (messageid != 4) && (messageid != 6));
|
||||
QV('smsKeyButton', otpsms && (messageid != 2) && (messageid != 4) && (messageid != 6));
|
||||
QV('msgKeyButton', otpmsg && (messageid != 2) && (messageid != 4) && (messageid != 6));
|
||||
QV('duoKeyButton', otpduo && (messageid != 2) && (messageid != 4) && (messageid != 6));
|
||||
|
||||
// If hardware key is an option, trigger it now
|
||||
if (autofido && twofakey) { setTimeout(function () { useSecurityKey(1); }, 300); }
|
||||
@@ -487,6 +491,7 @@
|
||||
QV('emailKeyButton2', otpemail && (messageid != 2) && (messageid != 4) && (messageid != 6));
|
||||
QV('smsKeyButton2', otpsms && (messageid != 2) && (messageid != 4) && (messageid != 6));
|
||||
QV('msgKeyButton2', otpmsg && (messageid != 2) && (messageid != 4) && (messageid != 6));
|
||||
QV('duoKeyButton2', otpduo && (messageid != 2) && (messageid != 4) && (messageid != 6));
|
||||
|
||||
// If hardware key is an option, trigger it now
|
||||
if (autofido && twofakey) { setTimeout(function () { useSecurityKey(2); }, 300); }
|
||||
@@ -617,6 +622,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
function useDuoToken(panelAction) {
|
||||
if (panelAction == 1) {
|
||||
Q('hwtokenInput').value = '**duo**';
|
||||
QE('tokenOkButton', true);
|
||||
Q('tokenOkButton').click();
|
||||
} else if (panelAction == 2) {
|
||||
Q('resetHwtokenInput').value = '**duo**';
|
||||
QE('resetTokenOkButton', true);
|
||||
Q('resetTokenOkButton').click();
|
||||
}
|
||||
}
|
||||
|
||||
function showPassHint(e) {
|
||||
messagebox("Password Hint", passhint);
|
||||
haltEvent(e);
|
||||
|
||||
Reference in New Issue
Block a user