pushy-electron 1.0.16 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Pushy.d.ts +2 -0
- package/lib/Pushy.js +6 -0
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/lib/Pushy.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ declare namespace Pushy {
|
|
|
28
28
|
|
|
29
29
|
function isEnterpriseConfigured(): boolean
|
|
30
30
|
|
|
31
|
+
function setDeviceCredentials(token: string, auth: string): void
|
|
32
|
+
|
|
31
33
|
function setEnterpriseConfig(endpoint: string, mqttEndpoint: string): void
|
|
32
34
|
|
|
33
35
|
function mTLS(config: object): void
|
package/lib/Pushy.js
CHANGED
|
@@ -288,6 +288,12 @@ module.exports = {
|
|
|
288
288
|
}
|
|
289
289
|
},
|
|
290
290
|
|
|
291
|
+
setDeviceCredentials(token, auth) {
|
|
292
|
+
// Manually set token & auth key
|
|
293
|
+
localStorage.set(config.storageKeys.token, token);
|
|
294
|
+
localStorage.set(config.storageKeys.tokenAuth, auth);
|
|
295
|
+
},
|
|
296
|
+
|
|
291
297
|
disconnect() {
|
|
292
298
|
// Attempt to disconnect from Pushy
|
|
293
299
|
mqtt.disconnect(this);
|
package/npm-shrinkwrap.json
CHANGED