Created
May 14, 2018 20:46
-
-
Save lite1979/3257d154fde2323ab7b9b4a7b78a94f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Authentication setup /// | |
qz.security.setCertificatePromise(function(resolve, reject) { | |
//Preferred method - from server | |
$.ajax("../Scripts/qz/assets/signing/digital-certificate.txt?2018").then(resolve, reject); | |
}); | |
qz.security.setSignaturePromise(function(toSign) { | |
return function(resolve, reject) { | |
//Preferred method - from server | |
$.ajax({ | |
type: "POST", | |
url: getURL("AdminService.asmx/getCertificate"), | |
data: "{'message':'" + toSign + "'}", | |
contentType: "application/json; charset=utf-8", | |
dataType: "text" | |
}).then(resolve, reject); | |
//Alternate method - unsigned | |
//resolve(); | |
}; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment