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
8873d525
Commit
8873d525
authored
Oct 24, 2018
by
zCaesar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
7b51d9fd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
authhook/auth_on_register.js
+0
-3
authhook/config/local-dev.json
+6
-6
No files found.
authhook/auth_on_register.js
View file @
8873d525
...
@@ -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
=
{
...
...
authhook/config/local-dev.json
View file @
8873d525
...
@@ -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"
:
fals
e
,
"auth_on_register_debug"
:
tru
e
,
"auth_on_publish_debug"
:
fals
e
,
"auth_on_publish_debug"
:
tru
e
,
"auth_on_subscribe_debug"
:
fals
e
,
"auth_on_subscribe_debug"
:
tru
e
,
"on_publish_debug"
:
fals
e
,
"on_publish_debug"
:
tru
e
,
"on_deliver_debug"
:
fals
e
,
"on_deliver_debug"
:
tru
e
,
"on_unsubscribe_debug"
:
fals
e
"on_unsubscribe_debug"
:
tru
e
}
}
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