hc-service-client
Advanced tools
Comparing version 1.0.7 to 1.1.0
@@ -33,7 +33,7 @@ 'use strict'; | ||
option.accessKeyId = app.config.defaultAccessKeyId || 'anonymous'; | ||
option.accessKeySecret = app.config.defaultAccessKeySecret || app.config.systemToken; | ||
option.accessKeySecret = app.config.defaultAccessKeySecret || app.config.systemToken; | ||
} else { | ||
option.endpoint = serviceCfg.endpoint || serviceCfg.endPoint; | ||
option.accessKeyId = serviceCfg.accessKeyId || app.config.defaultAccessKeyId || 'anonymous'; | ||
option.accessKeySecret = serviceCfg.accessKeySecret || serviceCfg.token || app.config.defaultAccessKeySecret || app.config.systemToken; | ||
option.accessKeySecret = serviceCfg.accessKeySecret || serviceCfg.token || app.config.defaultAccessKeySecret || app.config.systemToken; | ||
} | ||
@@ -51,3 +51,4 @@ if (this.headers[ridHeader.toLowerCase()]) { | ||
option.responseWrapper = serviceCfg.responseWrapper; | ||
option.source = config.source; | ||
option.target = serviceCode; | ||
return new ServiceClient(option); | ||
@@ -54,0 +55,0 @@ }; |
@@ -24,2 +24,4 @@ 'use strict'; | ||
} | ||
this.source = options.source; | ||
this.target = options.target; | ||
this.rid = options.rid; // rid | ||
@@ -32,2 +34,5 @@ this.remoteApp = options.remoteApp || 'service-client'; // remoteApp | ||
this.signatureProcessor = this.signatureApproach === 'userAuth' ? require('./signature/user_auth') : require('./signature/system_call'); // 签名处理方法 | ||
if (this.signatureApproach === 'common-user') { | ||
this.signatureProcessor = require('./signature/common_user_auth'); | ||
} | ||
this.timeout = options.timeout || 60000; // 请求超时,默认60秒 | ||
@@ -188,3 +193,5 @@ this.httpAgent = new http.Agent({ // httpAgent | ||
log: this.log, | ||
signatureHeader | ||
signatureHeader, | ||
source: this.source, | ||
target: this.target | ||
}; | ||
@@ -191,0 +198,0 @@ |
{ | ||
"name": "hc-service-client", | ||
"version": "1.0.7", | ||
"version": "1.1.0", | ||
"description": "Service Client Extension for Honeybee", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
48439
16
1026