I'm trying to get the authenticated user in a module, but I'm failing. I thought, by reading the doc, it should be possible to do
Code: Select all
http.request.auth
Code: Select all
http.request.auth
Code: Select all
console.log(JSON.stringify(http);
Code: Select all
console.log(http);
Code: Select all
console.log(JSON.stringify(http));
Code: Select all
[2016-09-13 21:30:44.624] [I] [core] {}
pah111kg wrote:My proposal does not help much:
... log: [object ZWayHTTP]Code: Select all
console.log(http);
... log: {}Code: Select all
console.log(JSON.stringify(http));
Code: Select all
curl -u user_1:pwd_1 http://host:8083/ZAutomation/api/v1/devices/InvertSwitch22/command/on
Code: Select all
curl -u user_1:pwd_1 -H "custom_user_header: user_name" http://localhost:8083/ZAutomation/api/v1/devices/InvertSwitch22/command/on