Commit 6f7ddb76 authored by Evgeniy Zaitsev's avatar Evgeniy Zaitsev
Browse files

new version

parent 8a70d658
...@@ -11,10 +11,11 @@ function * checkToken(next) { ...@@ -11,10 +11,11 @@ function * checkToken(next) {
this.throwResponseErrorIfNeed(this.errors); this.throwResponseErrorIfNeed(this.errors);
const reqBody = serialize(this.request.body); const reqBody = serialize(this.request.body);
const querystring = this.request.querystring ? '?' + this.request.querystring : '';
this.logger.log(__filename, '\n', this.request.path, '\n', this.request.querystring, '\n', reqBody); this.logger.log(__filename, '\n', this.request.path, '\n', this.request.querystring, '\n', reqBody);
const signeableContent = this.request.path + '?' + this.request.querystring + reqBody; const signeableContent = this.request.path + querystring + reqBody;
const privateSignature = sha1(this.config.accessToken + signeableContent + salt); const privateSignature = sha1(this.config.accessToken + signeableContent + salt);
this.logger.log(__filename, 'private signature:', privateSignature); this.logger.log(__filename, 'private signature:', privateSignature);
......
...@@ -23,9 +23,11 @@ ...@@ -23,9 +23,11 @@
}, },
"scripts": { "scripts": {
"start": "node app.js", "start": "node app.js",
"lint": "eslint ./**/*.js" "lint": "eslint ./**/*.js",
"copy-to-releases": "cpy constants/* ../service-sdk-releases/constants && cpy lib/* ../service-sdk-releases/lib && cpy middlewares/* ../service-sdk-releases/middlewares && cpy router/* ../service-sdk-releases/router && cpy .editorconfig .eslintignore .eslintrc .gitignore app.js package.json ../service-sdk-releases"
}, },
"devDependencies": { "devDependencies": {
"cpy-cli": "^1.0.1",
"eslint": "^3.7.1", "eslint": "^3.7.1",
"eslint-config-google": "^0.6.0" "eslint-config-google": "^0.6.0"
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment