Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// API
setSignaturePromise: function(promiseGen, alg) {
_qz.security.signaturePromise = promiseGen;
// TODO: Detect QZ version, warn
_qz.security.signatureAlg = alg;
}
// Implementation
qz.security.setSignaturePromise(function(toSign) {
return function(resolve, reject) {
$.ajax("/secure/url/for/sign-message?request=" + toSign + "&alg=" qz.security.getSignatureAlg()).then(resolve, reject);
};
}, 'sha1');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.