Commit d86a12a6 authored by Evgeniy Zaitsev's avatar Evgeniy Zaitsev
Browse files

v0.0.10

parent 6066db22
...@@ -7,6 +7,7 @@ function * checkToken(next) { ...@@ -7,6 +7,7 @@ function * checkToken(next) {
const signature = this.checkHeader('x-lvis-signature').notBlank().value; const signature = this.checkHeader('x-lvis-signature').notBlank().value;
this.logger.log(__filename, 'headers:', JSON.stringify({salt, signature})); this.logger.log(__filename, 'headers:', JSON.stringify({salt, signature}));
this.logger.log(__filename, 'body:', JSON.stringify(this.request.body));
this.throwResponseErrorIfNeed(this.errors); this.throwResponseErrorIfNeed(this.errors);
...@@ -16,7 +17,11 @@ function * checkToken(next) { ...@@ -16,7 +17,11 @@ function * checkToken(next) {
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 + querystring + reqBody; const signeableContent = this.request.path + querystring + reqBody;
const privateSignature = sha1(this.config.accessToken + signeableContent + salt); const str = this.config.accessToken + signeableContent + salt;
this.logger.log(__filename, 'sa1 from str:', str);
const privateSignature = sha1(str);
this.logger.log(__filename, 'private signature:', privateSignature); this.logger.log(__filename, 'private signature:', privateSignature);
......
{ {
"name": "service-sdk", "name": "service-sdk",
"version": "0.0.9", "version": "0.0.10",
"private": true, "private": true,
"description": "Service SDK for LViS", "description": "Service SDK for LViS",
"keywords": [], "keywords": [],
......
...@@ -29,7 +29,7 @@ router ...@@ -29,7 +29,7 @@ router
'/lvis/:instanceId/project/:projectId/tabs', '/lvis/:instanceId/project/:projectId/tabs',
checkSignature, checkInstanceId, checkProjectId, tabs.getProject checkSignature, checkInstanceId, checkProjectId, tabs.getProject
) )
.get( .get(
'/lvis/:instanceId/project/:projectId/events/:eventId/tabs', '/lvis/:instanceId/project/:projectId/events/:eventId/tabs',
checkSignature, checkInstanceId, checkProjectId, checkEventId, tabs.getEvent checkSignature, checkInstanceId, checkProjectId, checkEventId, tabs.getEvent
...@@ -39,7 +39,7 @@ router ...@@ -39,7 +39,7 @@ router
'/lvis/:instanceId/project/:projectId/tabs/:tabId', '/lvis/:instanceId/project/:projectId/tabs/:tabId',
checkInstanceId, checkProjectId, checkTabId, checkSessionToken, tab.getEvent checkInstanceId, checkProjectId, checkTabId, checkSessionToken, tab.getEvent
) )
.get( .get(
'/lvis/:instanceId/project/:projectId/events/:eventId/tabs/:tabId', '/lvis/:instanceId/project/:projectId/events/:eventId/tabs/:tabId',
checkInstanceId, checkProjectId, checkEventId, checkTabId, checkSessionToken, tab.getEvent checkInstanceId, checkProjectId, checkEventId, checkTabId, checkSessionToken, tab.getEvent
......
...@@ -27,7 +27,6 @@ function * getEvent() { ...@@ -27,7 +27,6 @@ function * getEvent() {
return; return;
} }
const tabs = yield this.config.eventTabsCallback(this.state.instance, this.state.project, this.state.eventId); const tabs = yield this.config.eventTabsCallback(this.state.instance, this.state.project, this.state.eventId);
tabs.forEach(tab => Object.assign(tab, { tabs.forEach(tab => Object.assign(tab, {
......
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