Commit 8873d525 by zCaesar

a

parent 7b51d9fd
...@@ -26,9 +26,6 @@ function authCheck(client_id, token, password, callback) { ...@@ -26,9 +26,6 @@ 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.result[0])
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 = {
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
"token_registry_host" : "alpha.nexpie.io", "token_registry_host" : "alpha.nexpie.io",
"token_registry_port" : 8790, "token_registry_port" : 8790,
"auth_on_register_debug" : false, "auth_on_register_debug" : true,
"auth_on_publish_debug" : false, "auth_on_publish_debug" : true,
"auth_on_subscribe_debug" : false, "auth_on_subscribe_debug" : true,
"on_publish_debug" : false, "on_publish_debug" : true,
"on_deliver_debug" : false, "on_deliver_debug" : true,
"on_unsubscribe_debug" : false "on_unsubscribe_debug" : true
} }
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