Commit 33631ebd by zCaesar

add log

parent 8873d525
...@@ -26,6 +26,9 @@ function authCheck(client_id, token, password, callback) { ...@@ -26,6 +26,9 @@ function authCheck(client_id, token, password, callback) {
if (require('jwt-verify').verify(token)) callback(true) // auth client device by token if (require('jwt-verify').verify(token)) callback(true) // auth client device by token
else { else {
seneca.act('ms:tokenregistry, cmd:getAttributes, type:device, tokencode:'+token, function(err,res) { seneca.act('ms:tokenregistry, cmd:getAttributes, type:device, tokencode:'+token, function(err,res) {
console.log('-------------------------res-------------------------------')
console.log(res)
console.log('-------------------------res-------------------------------')
if (!err && res) { if (!err && res) {
var token_profile = (res&&res.result&&res.result[0])?res.result[0]:{}; var token_profile = (res&&res.result&&res.result[0])?res.result[0]:{};
var mqttauth = { var mqttauth = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment