@seydx/tr064
Advanced tools
Comparing version 0.4.2-0 to 0.4.2-1
{ | ||
"name": "@seydx/tr064", | ||
"version": "0.4.2-0", | ||
"version": "0.4.2-1", | ||
"author": "Nicolai Schmid <hey@schmid.uno>", | ||
@@ -5,0 +5,0 @@ "description": "TR-064 - UPnP/IGD for node.js", |
@@ -138,11 +138,10 @@ var parseString = require('xml2js').parseString; | ||
const self = this; | ||
if(!Object.keys(self.waitForAuth).length|| | ||
(serviceType == self.waitForAuth.serviceType&& | ||
action == self.waitForAuth.action&& | ||
vars == self.waitForAuth.vars&& | ||
url == self.waitForAuth.url)&& | ||
inArguments == self.waitForAuth.inArguments&& | ||
outArguments == self.waitForAuth.outArguments){ | ||
(serviceType==self.waitForAuth.serviceType&& | ||
action==self.waitForAuth.action&& | ||
vars==self.waitForAuth.vars&& | ||
url==self.waitForAuth.url&& | ||
inArguments==self.waitForAuth.inArguments&& | ||
outArguments==self.waitForAuth.outArguments&& | ||
device.meta.host==self.waitForAuth.host)){ | ||
var head = ''; | ||
@@ -152,5 +151,3 @@ if (device._auth.uid) { | ||
if (device._auth.auth) { | ||
self.waitForAuth = {}; | ||
head = '<s:Header>' + | ||
@@ -174,3 +171,2 @@ '<h:ClientAuth xmlns:h="http://soap-authentication.org/digest/2001/10/"' + | ||
} else { | ||
self.waitForAuth = { | ||
@@ -182,5 +178,5 @@ serviceType:serviceType, | ||
inArguments:inArguments, | ||
outArguments:outArguments | ||
outArguments:outArguments, | ||
host: device.meta.host | ||
}; | ||
// First Auth | ||
@@ -200,3 +196,2 @@ head = ' <s:Header>' + | ||
} | ||
var body = '<?xml version="1.0" encoding="utf-8"?>' + | ||
@@ -211,3 +206,2 @@ '<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s=" http://schemas.xmlsoap.org/soap/envelope/">' + | ||
'">'; | ||
for (var i in vars) { | ||
@@ -218,5 +212,3 @@ body += '<' + vars[i].name + '>'; | ||
} | ||
body = body + '</u:' + action + '>' + '</s:Body>' + '</s:Envelope>'; | ||
var port = 0, | ||
@@ -348,2 +340,3 @@ proto = '', | ||
if (body['u:' + action + 'Response']) { | ||
self.waitForAuth = {}; | ||
var responseVars = body['u:' + action + 'Response']; | ||
@@ -430,3 +423,3 @@ if (outArguments) { | ||
); | ||
},1000); | ||
},1000); | ||
} | ||
@@ -433,0 +426,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222859
709