1.0.10 • Published 9 years ago
qlik-sp4ce-init-whitelist v1.0.10
qlik-sp4ce-init-whitelist
A plugin for the qlik-sp4ce-init module
Author: Loic Formont
License: MIT Licensed
Copyright: Copyright (C) 2015 Loic Formont
Example
var initWhitelist = require("qlik-sp4ce-init-whitelist");
- qlik-sp4ce-init-whitelist
- static
- .init(options, headers) ⇒ task
- inner
- static
initWhitelist.init(options, headers) ⇒ task
Inits a task that tries to add an IP into the whitelist
Kind: static method of qlik-sp4ce-init-whitelist
Param | Type | Default | Description |
---|---|---|---|
options | Object | a set of parameters with default values described below | |
options.cert | string | "..\\Exported Certificates\\localhost\\client.pfx" | the path to the Qlik Sense pfx certificate |
options.host | string | "localhost" | the URI of the Qlik Sense QRS endpoint (relative to the node server ofc) |
options.ip | string | "<calling url>" | the ip to add to the whitelist |
options.retry | string | 30 | the maximum number of retries |
options.httpTimeout | string | 10000 | the maximum http timeout |
options.retryTimeout | string | 5000 | the maximum retry timeout |
headers | Object | the headers of the http request that called this function |
initWhitelist~add(certif, host, ip, retry, httpTimeout, task) ⇒ Promise
Tries to add the specified ip to the host whitelist
Kind: inner method of qlik-sp4ce-init-whitelist
Returns: Promise - a promise resolving to the returned value
Param | Type | Description |
---|---|---|
certif | buffer | the certificate pfx buffered file |
host | string | the host with the QRS endpoint |
ip | string | the IP to add to the whitelist |
retry | int | the current number of retries |
httpTimeout | int | the http timeout |
task | task | the task to tell when progress is done |
Example
var added = add(certif, host, ip, retry, httpTimeout, task);
added.fail(console.log);
initWhitelist~loop(certif, host, ip, retry, retryTimeout, httpTimeout, task) ⇒ Promise
Loops until whitelis addition is a success or retry number is reached
Kind: inner method of qlik-sp4ce-init-whitelist
Returns: Promise - a promise resolving to the returned value
Param | Type | Description |
---|---|---|
certif | buffer | the certificate pfx buffered file |
host | string | the host with the QRS endpoint |
ip | string | the IP to add to the whitelist |
retry | int | the current number of retries |
retryTimeout | int | the retry timeout |
httpTimeout | int | the http timeout |
task | task | the task to tell when progress is done |
Example
loop(certif, host, ip, retry, retryTimeout, httpTimeout, task);