Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hc-service-client

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hc-service-client - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

5

lib/service_client.js

@@ -32,5 +32,8 @@ 'use strict';

this.signatureApproach = options.signatureApproach || 'systemCall'; // 签名方法名
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');
} else if (this.signatureApproach === 'userAuth') {
this.signatureProcessor = require('./signature/user_auth');
} else {
this.signatureProcessor = require('./signature/system_call');
}

@@ -37,0 +40,0 @@ this.timeout = options.timeout || 60000; // 请求超时,默认60秒

6

lib/signature/common_user_auth.js

@@ -25,7 +25,7 @@ 'use strict';

let bodymd5;
if (!body) {
bodymd5 = body;
} else {
if (['POST', 'PUT', 'PATCH'].indexOf(method) >= 0) {
bodymd5 = md5(Buffer.from(body));
headers['Content-MD5'] = bodymd5;
} else {
bodymd5 = '';
}

@@ -32,0 +32,0 @@ let stringToSign = method + '\n' + accept + '\n' + bodymd5 +

{
"name": "hc-service-client",
"version": "1.1.0",
"version": "1.1.1",
"description": "Service Client Extension for Honeybee",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc