mirror of
https://github.com/donl/plivo-node.git
synced 2026-06-30 06:12:08 -06:00
commit
85889c19a1
7 changed files with 29 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
service_name: travis-ci
|
||||
language: node_js
|
||||
node_js:
|
||||
- "node"
|
||||
# - "node" commenting this as we have to find out a solution for node12 & gulp3
|
||||
- "lts/*"
|
||||
- "8"
|
||||
- "7"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
# Change Log
|
||||
|
||||
## [4.1.2](https://github.com/plivo/plivo-node/releases/tag/v4.1.0)(2019-03-11)
|
||||
## [4.1.3](https://github.com/plivo/plivo-node/releases/tag/v4.1.3)(2019-07-30)
|
||||
- Add proxy-support for Signature Validation
|
||||
- Add HTTP status codes in responses
|
||||
|
||||
## [4.1.2](https://github.com/plivo/plivo-node/releases/tag/v4.1.2)(2019-03-19)
|
||||
- Add support: Handling circular reference stringify logic
|
||||
|
||||
## [4.1.1](https://github.com/plivo/plivo-node/releases/tag/v4.1.0)(2019-03-11)
|
||||
## [4.1.1](https://github.com/plivo/plivo-node/releases/tag/v4.1.1)(2019-03-11)
|
||||
- Add PHLO support
|
||||
- Add Multiparty call triggers
|
||||
|
||||
|
|
|
|||
7
Jenkinsfile
vendored
Normal file
7
Jenkinsfile
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!groovy
|
||||
|
||||
@Library('plivo_standard_libs@sdks') _
|
||||
|
||||
sdksPipeline ([
|
||||
buildContainer: 'plivo/jenkins-ci/node-sdk:latest'
|
||||
])
|
||||
7
ci/config.yml
Normal file
7
ci/config.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
parent: central
|
||||
serviceName: plivo-node
|
||||
language: node-sdk
|
||||
build:
|
||||
command: |
|
||||
npm install
|
||||
|
|
@ -59,6 +59,10 @@ export function Request(config) {
|
|||
}
|
||||
} else {
|
||||
let body = response.body;
|
||||
let isObj = typeof _body === 'object' && _body !== null && !(_body instanceof Array) && !(_body instanceof Date)
|
||||
if (isObj) {
|
||||
_body['statusCode'] = response.statusCode;
|
||||
}
|
||||
resolve({ response: response, body: body });
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@ export function validateSignature(uri: string, nonce: string, signature: string,
|
|||
uri = utf8.encode(uri);
|
||||
let parsed_uri = parser.parse(uri);
|
||||
let url_protocol = parsed_uri.protocol == '' ? 'http://' : parsed_uri.protocol+'://';
|
||||
let base_url = buildUrl(url_protocol+parsed_uri.host, { path: parsed_uri.path });
|
||||
let proxy = parsed_uri.port == '' ? parsed_uri.host : parsed_uri.host + ':' + parsed_uri.port;
|
||||
let base_url = buildUrl(url_protocol + proxy , { path: parsed_uri.path });
|
||||
let hmac = crypto.createHmac('sha256', auth_token);
|
||||
let hmacBytes = base64.decode(hmac.update(base_url+nonce).digest('base64'));
|
||||
let authentication_string = base64.encode(hmacBytes);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "plivo",
|
||||
"version": "4.1.2",
|
||||
"description": "A Node.js SDK to make voice calls & send SMS using Plivo and to generate Plivo XML",
|
||||
"version": "4.1.3",
|
||||
"description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML",
|
||||
"homepage": "https://github.com/plivo/plivo-node",
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue