Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
publics
service-sdk-releases
Commits
318e2dea
Commit
318e2dea
authored
Oct 17, 2016
by
Evgeniy Zaitsev
Browse files
v0.0.11
parent
d86a12a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
middlewares/checkSignature.js
View file @
318e2dea
const
sha1
=
require
(
'
sha1
'
);
const
serialize
=
require
(
'
../lib/serialize
'
);
const
parse
=
require
(
'
co-body
'
);
function
*
checkToken
(
next
)
{
const
salt
=
this
.
checkHeader
(
'
x-lvis-salt
'
).
notBlank
().
value
;
...
...
@@ -11,7 +10,7 @@ function * checkToken(next) {
this
.
throwResponseErrorIfNeed
(
this
.
errors
);
const
reqBody
=
serialize
(
this
.
request
.
body
);
const
reqBody
=
yield
parse
.
text
(
this
.
request
);
const
querystring
=
this
.
request
.
querystring
?
'
?
'
+
this
.
request
.
querystring
:
''
;
this
.
logger
.
log
(
__filename
,
'
\n
'
,
this
.
request
.
path
,
'
\n
'
,
this
.
request
.
querystring
,
'
\n
'
,
reqBody
);
...
...
package.json
View file @
318e2dea
{
"name"
:
"service-sdk"
,
"version"
:
"0.0.1
0
"
,
"version"
:
"0.0.1
1
"
,
"private"
:
true
,
"description"
:
"Service SDK for LViS"
,
"keywords"
:
[],
...
...
@@ -12,6 +12,7 @@
},
"dependencies"
:
{
"
bluebird
"
:
"
^3.4.6
"
,
"
co-body
"
:
"
^4.2.0
"
,
"
debug
"
:
"
^2.2.0
"
,
"
koa
"
:
"
^1.2.4
"
,
"
koa-bodyparser
"
:
"
^2.2.0
"
,
...
...
Write
Preview
Supports
Markdown
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