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
c9a62925
Commit
c9a62925
authored
Sep 16, 2018
by
zCaesar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add endpoint ondelivery
parent
673488d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
26 deletions
+0
-26
authhook/verifyToken.js
+0
-26
No files found.
authhook/verifyToken.js
deleted
100644 → 0
View file @
673488d8
var
jwt
=
require
(
'jsonwebtoken'
)
var
config
=
require
(
'config'
)
function
verifyToken
(
token
,
callback
)
{
const
verifyOptions
=
{
algorithms
:
[
'RS256'
]
};
jwt
.
verify
(
token
,
config
.
get
(
'pubca'
),
verifyOptions
,
(
err
,
decoded
)
=>
{
callback
(
err
,
decoded
)
})
}
module
.
exports
.
verifyToken
=
verifyToken
// signToken(role, '10000ms', (token) => {
// console.log(token)
// setInterval(() => {
// verifyToken(token, (err, decoded) => {
// if (err) {
// console.log(err)
// process.exit(0)
// }
// else console.log(decoded)
// })
// }, 5000)
// })
\ No newline at end of file
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