Calls related to signing connection requests.
- Source:
Methods
(static) getSignatureAlgorithm() → {string}
Get the signing algorithm QZ will be checking signatures against.
- Since:
- 2.1.0
- Source:
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
|
- Source:
(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:
(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:
Example
qz.security.setSignaturePromise(function(dataToSign) {
return function(resolve, reject) {
$.ajax("/signing-url?data=" + dataToSign).then(resolve, reject);
}
})