Commit e8a395fd by zCaesar

Merge branch 'redis' into 'master'

fix auth regis

See merge request !11
parents 7c17c7be 5f73e514
......@@ -30,8 +30,7 @@ function authCheck(client_id, token, password, callback) {
console.log('token :' + token)
seneca.act('ms:tokenregistry, cmd:getAttributes, type:device, tokencode:' + token, function (err, res) {
console.log('result : ' + util.inspect(res.result, false, null, true))
if (res.result.length > 0) {
console.log(res.result)
if (res.result) {
var token_profile = (res && res.result) ? res.result : {};
var mqttauth = {
clientid: client_id,
......
......@@ -25,7 +25,7 @@ module.exports.auth_connect = auth_connect
}
*/
function auth_connect(mqttauth, token_profile) {
console.log('auth_connect')
var dateNow = Math.floor(Date.now() / 1000)
var res = {
status : 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