Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
node-bigstream
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bs
node-bigstream
Commits
b3ef9e80
Commit
b3ef9e80
authored
Oct 18, 2021
by
Kamron Aroonrua
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http jwt decode
parent
f1147c38
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
3 deletions
+68
-3
.env
.env
+1
-1
Changelog
Changelog
+3
-1
service-main.js
http-listener/ws/service-main.js
+1
-0
perform.js
plugins/di/di-input/perform.js
+1
-0
index.js
plugins/dt/dt-jwt-verify/index.js
+13
-0
perform.js
plugins/dt/dt-jwt-verify/perform.js
+48
-0
version.json
version.json
+1
-1
No files found.
.env
View file @
b3ef9e80
BIGSTREAM_IMG=bigstream:
tes
t
BIGSTREAM_IMG=bigstream:
jw
t
BS_SECRET=bigstream-server
REDIS_TAG=4
PREFIX_NO=19
...
...
Changelog
View file @
b3ef9e80
#Changelog
## [1.2.5dev] - 2021-
08-11
## [1.2.5dev] - 2021-
10-07
### Added
- DOCKER :: TZ Data
- STORAGE :: Wirdcard Subscribe
- PLUGIN :: dt-jwt-verify
- TRIGGER :: http-listener add query meta
### Fixed
- PLUGIN :: dt-mysql port param
## [1.2.4] - 2021-06-21
...
...
http-listener/ws/service-main.js
View file @
b3ef9e80
...
...
@@ -30,6 +30,7 @@ var process_req = function(req, res ,method) {
'object_type'
:
'httpdata'
,
'headers'
:
req
.
headers
,
'method'
:
method
,
'query'
:
reqHelper
.
getQuery
(),
'data'
:
{}
}
...
...
plugins/di/di-input/perform.js
View file @
b3ef9e80
...
...
@@ -20,6 +20,7 @@ function perform_function(context,response){
if
(
param
.
http_meta
){
input_meta
.
http_headers
=
htdata
.
headers
;
input_meta
.
http_method
=
htdata
.
method
;
input_meta
.
http_query
=
htdata
.
query
;
}
if
(
typeof
htdata
.
data
==
'object'
&&
htdata
.
data
.
type
==
'Buffer'
){
data
=
Buffer
.
from
(
htdata
.
data
);
...
...
plugins/dt/dt-jwt-verify/index.js
0 → 100644
View file @
b3ef9e80
var
util
=
require
(
'util'
);
var
DTPlugin
=
require
(
'../dt-plugin'
);
function
DTTask
(
context
,
request
){
DTPlugin
.
call
(
this
,
context
,
request
);
this
.
name
=
"jwt-verify"
;
this
.
output_type
=
""
;
}
util
.
inherits
(
DTTask
,
DTPlugin
);
DTTask
.
prototype
.
perform
=
require
(
'./perform'
);
module
.
exports
=
DTTask
;
\ No newline at end of file
plugins/dt/dt-jwt-verify/perform.js
0 → 100644
View file @
b3ef9e80
var
jwt
=
require
(
'jsonwebtoken'
);
var
ctx
=
require
(
'../../../context'
);
var
Utils
=
ctx
.
getLib
(
'lib/util/plugin-utils'
);
function
perform_function
(
context
,
request
,
response
){
var
job_id
=
context
.
jobconfig
.
job_id
;
var
transaction_id
=
context
.
transaction
.
id
;
var
param
=
context
.
task
.
config
.
param
||
{};
var
memstore
=
context
.
task
.
memstore
var
output_type
=
request
.
input_type
;
var
data
=
request
.
data
;
var
meta
=
request
.
meta
||
{};
var
req_token
=
param
.
token
||
""
var
req_secret
=
param
.
secret
||
""
var
env
=
{
'type'
:
output_type
,
'data'
:
data
,
'meta'
:
meta
}
req_secret
=
Utils
.
vm_execute_text
(
env
,
req_secret
);
req_token
=
Utils
.
vm_execute_text
(
env
,
req_token
);
var
jwtout
=
{
"error"
:
true
,
"decode"
:{}
}
jwt
.
verify
(
req_token
,
req_secret
,
function
(
err
,
decoded
)
{
if
(
!
err
){
jwtout
.
error
=
false
;
jwtout
.
decode
=
decoded
;
}
meta
.
jwt
=
jwtout
response
.
meta
=
meta
;
response
.
success
(
data
,
output_type
);
});
//response.success();
//response.reject();
//response.error("error message")
}
module
.
exports
=
perform_function
;
version.json
View file @
b3ef9e80
{
"version"
:
"1.2.5dev"
,
"build"
:
"2021
0811000
0"
"build"
:
"2021
1007003
0"
}
\ 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