Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-wazo-platform

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-wazo-platform - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

34

nodes/auth.js

@@ -62,8 +62,13 @@ module.exports = function(RED) {

const { refreshToken, ...result } = await this.client.auth.logIn({
username: req.body.username,
password: req.body.password
});
try {
const { refreshToken, ...result } = await this.client.auth.logIn({
username: req.body.username,
password: req.body.password
});
res.send(refreshToken);
res.send(refreshToken);
}
catch(err) {
res.send(err);
}
});

@@ -81,17 +86,16 @@

client.setToken(authentication.token);
try {
const url = `https://${req.body.host}:${req.body.port}/api/auth/0.1/users/me/tokens`;
const { ...refreshToken } = await listRefreshToken(url, authentication.token);
res.json(refreshToken);
}
catch(err) {
res.send(err);
}
}
catch(err) {
node.error(err);
res.send(err);
}
try {
const url = `https://${req.body.host}:${req.body.port}/api/auth/0.1/users/me/tokens`;
const { ...refreshToken } = await listRefreshToken(url, authentication.token);
res.json(refreshToken);
}
catch(err) {
node.error(err);
res.send(err);
}
});

@@ -98,0 +102,0 @@

@@ -86,2 +86,9 @@ module.exports = function (RED) {

client.setToken(authentication.token);
try {
const { ...users } = await client.confd.listUsers();
res.json(users);
}
catch(err) {
res.send(err);
}
}

@@ -91,10 +98,2 @@ catch(err) {

}
try {
const { ...users } = await client.confd.listUsers();
res.json(users);
}
catch(err) {
res.send(err);
}
});

@@ -101,0 +100,0 @@

@@ -64,15 +64,14 @@ module.exports = function (RED) {

client.setToken(authentication.token);
}
catch(err) {
res.send(err);
}
try {
// FIXME: Remove when SDK will be ready
// const { ...trunks } = await client.confd.listContexts();
try {
// FIXME: Remove when SDK will be ready
// const { ...trunks } = await client.confd.listContexts();
const url = `https://${req.body.host}:${req.body.port}/api/confd/1.1/contexts`;
const { ...trunks } = await listContexts(url, authentication.token);
const url = `https://${req.body.host}:${req.body.port}/api/confd/1.1/contexts`;
const { ...trunks } = await listContexts(url, authentication.token);
res.json(trunks);
res.json(trunks);
}
catch(err) {
res.send(err);
}
}

@@ -82,2 +81,3 @@ catch(err) {

}
});

@@ -84,0 +84,0 @@

@@ -76,16 +76,15 @@ module.exports = function (RED) {

try {
const { ...authentication } = await client.auth.refreshToken(req.body.refreshToken);
client.setToken(authentication.token);
}
catch(err) {
res.send(err);
}
const { ...authentication } = await client.auth.refreshToken(req.body.refreshToken);
client.setToken(authentication.token);
try {
// FIXME: Remove when SDK will be ready
// const { ...trunks } = await client.confd.listTrunks();
try {
// FIXME: Remove when SDK will be ready
// const { ...trunks } = await client.confd.listTrunks();
const url = `https://${req.body.host}:${req.body.port}/api/confd/1.1/trunks`;
const { ...trunks } = await listTrunks(url, authentication.token);
res.json(trunks);
const url = `https://${req.body.host}:${req.body.port}/api/confd/1.1/trunks`;
const { ...trunks } = await listTrunks(url, authentication.token);
res.json(trunks);
}
catch(err) {
res.send(err);
}
}

@@ -92,0 +91,0 @@ catch(err) {

{
"name": "node-red-contrib-wazo-platform",
"version": "0.0.22",
"version": "0.0.23",
"description": "Node Red module for the Wazo Platform API",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc