• Download
  • Demo
  • Buy
  • API
  • Docs
  • Support
  • About
  • Contact
  • Login
API Home
Namespaces
qzapiconfigsfilehidnetworkingprinterssecurityserialsocketusbwebsocket
API Home
Namespaces
qzapiconfigsfilehidnetworkingprinterssecurityserialsocketusbwebsocket

Namespace: security

qz.security

Calls related to signing connection requests.
Source:
  • qz-tray.js, line 2657

Methods

(static) getSignatureAlgorithm() → {string}

Get the signing algorithm QZ will be checking signatures against.
Since:
  • 2.1.0
Source:
  • qz-tray.js, line 2726
Returns:
The algorithm used in signing.
Type
string

(static) setCertificatePromise(promiseHandler, optionsopt)

Set promise resolver for calls to acquire the site's certificate.
Parameters:
Name Type Attributes Description
promiseHandler function | AsyncFunction | Promise.<string> Either a function that will be used as a promise resolver (of format Function({function} resolve, {function}reject)), an async function, or a promise. Any of which should return the public certificate via their respective resolve call.
options Object <optional>
Configuration options for the certificate resolver
Properties
Name Type Attributes Default Description
rejectOnFailure boolean <optional>
[false] Overrides default behavior to call resolve with a blank certificate on failure.
Source:
  • qz-tray.js, line 2671

(static) setSignatureAlgorithm(algorithm)

Set which signing algorithm QZ will check signatures against.
Parameters:
Name Type Description
algorithm string The algorithm used in signing. Valid values: [SHA1 | SHA256 | SHA512]
Since:
  • 2.1.0
Source:
  • qz-tray.js, line 2705

(static) setSignaturePromise(promiseFactory)

Set promise factory for calls to sign API calls.
Parameters:
Name Type Description
promiseFactory function | AsyncFunction Either a function that accepts a string parameter of the data to be signed and returns a function to be used as a promise resolver (of format Function({function} resolve, {function}reject)), or an async function that can take a string parameter of the data to be signed. Either of which should return the signed contents of the passed string parameter via their respective resolve call.
Source:
  • qz-tray.js, line 2693
Example
qz.security.setSignaturePromise(function(dataToSign) {
   return function(resolve, reject) {
     $.ajax("/signing-url?data=" + dataToSign).then(resolve, reject);
   }
 })
Documentation generated by JSDoc 3.6.11

© 2025 qz | Privacy Policy