@orion-js/echoes
Advanced tools
Comparing version 3.2.21 to 3.2.25
@@ -6,11 +6,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const config_1 = __importDefault(require("../config")); | ||
const jssha_1 = __importDefault(require("jssha")); | ||
const getPassword_1 = require("./getPassword"); | ||
function default_1(body) { | ||
const secret = config_1.default.requests.key || ''; | ||
if (!secret) { | ||
console.warn('Warning: no secret key found for echoes requests'); | ||
} | ||
const password = (0, getPassword_1.getEchoesPassword)(); | ||
const shaObj = new jssha_1.default('SHA-1', 'TEXT'); | ||
shaObj.setHMACKey(secret, 'TEXT'); | ||
shaObj.setHMACKey(password, 'TEXT'); | ||
shaObj.update(body); | ||
@@ -17,0 +14,0 @@ return shaObj.getHMAC('HEX'); |
@@ -39,5 +39,6 @@ import { ConsumerConfig, KafkaConfig, ProducerConfig, Consumer, Producer, EachMessagePayload } from 'kafkajs'; | ||
/** | ||
* The secret key used to sign all requests. Shared between all your services | ||
* The secret key used to sign all requests. Shared between all your services. | ||
* You can also set the env var echoes_password or process.env.ECHOES_PASSWORD | ||
*/ | ||
key: string; | ||
key?: string; | ||
/** | ||
@@ -44,0 +45,0 @@ * The path of the echoes http receiver. Defaults to /echoes-services |
{ | ||
"name": "@orion-js/echoes", | ||
"version": "3.2.21", | ||
"version": "3.2.25", | ||
"main": "lib/index.js", | ||
@@ -20,2 +20,3 @@ "types": "lib/index.d.ts", | ||
"dependencies": { | ||
"@orion-js/env": "^3.2.21", | ||
"@orion-js/helpers": "^3.2.21", | ||
@@ -43,3 +44,3 @@ "@orion-js/http": "^3.2.21", | ||
}, | ||
"gitHead": "160e776b7a8448c8e4f67cae79849d6520eaf0c1" | ||
"gitHead": "29708f52f1eb079b5d810b363c9780518e5c14e9" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26052
42
643
9
+ Added@orion-js/env@^3.2.21