Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vernemq
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stack
vernemq
Commits
5f73e514
Commit
5f73e514
authored
Dec 07, 2018
by
zCaesar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix auth regis
parent
aac8e7d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
authhook/auth_on_register.js
+1
-2
authhook/validator.js
+1
-1
No files found.
authhook/auth_on_register.js
View file @
5f73e514
...
@@ -30,8 +30,7 @@ function authCheck(client_id, token, password, callback) {
...
@@ -30,8 +30,7 @@ function authCheck(client_id, token, password, callback) {
console
.
log
(
'token :'
+
token
)
console
.
log
(
'token :'
+
token
)
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
(
'result : '
+
util
.
inspect
(
res
.
result
,
false
,
null
,
true
))
console
.
log
(
'result : '
+
util
.
inspect
(
res
.
result
,
false
,
null
,
true
))
if
(
res
.
result
.
length
>
0
)
{
if
(
res
.
result
)
{
console
.
log
(
res
.
result
)
var
token_profile
=
(
res
&&
res
.
result
)
?
res
.
result
:
{};
var
token_profile
=
(
res
&&
res
.
result
)
?
res
.
result
:
{};
var
mqttauth
=
{
var
mqttauth
=
{
clientid
:
client_id
,
clientid
:
client_id
,
...
...
authhook/validator.js
View file @
5f73e514
...
@@ -25,7 +25,7 @@ module.exports.auth_connect = auth_connect
...
@@ -25,7 +25,7 @@ module.exports.auth_connect = auth_connect
}
}
*/
*/
function
auth_connect
(
mqttauth
,
token_profile
)
{
function
auth_connect
(
mqttauth
,
token_profile
)
{
console
.
log
(
'auth_connect'
)
var
dateNow
=
Math
.
floor
(
Date
.
now
()
/
1000
)
var
dateNow
=
Math
.
floor
(
Date
.
now
()
/
1000
)
var
res
=
{
var
res
=
{
status
:
true
status
:
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment