@adobe/spacecat-shared-http-utils 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-http-utils-v1.6.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.6.3...@adobe/spacecat-shared-http-utils-v1.6.4) (2024-08-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Add id to api-key DTO ([#330](https://github.com/adobe/spacecat-shared/issues/330)) ([aa451ab](https://github.com/adobe/spacecat-shared/commit/aa451abf7b0178412803b553fe9a39f47e958c02))
7
+
8
+ # [@adobe/spacecat-shared-http-utils-v1.6.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.6.2...@adobe/spacecat-shared-http-utils-v1.6.3) (2024-08-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * refactor hashedApiKey ([#328](https://github.com/adobe/spacecat-shared/issues/328)) ([7cb8908](https://github.com/adobe/spacecat-shared/commit/7cb8908c13ffede4849fc0bd0b585ce31b4dc79a))
14
+
1
15
  # [@adobe/spacecat-shared-http-utils-v1.6.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.6.1...@adobe/spacecat-shared-http-utils-v1.6.2) (2024-08-15)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-http-utils",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "Shared modules of the Spacecat Services - HTTP Utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@adobe/fetch": "4.1.8",
33
33
  "@adobe/spacecat-shared-utils": "1.19.1",
34
- "@adobe/spacecat-shared-data-access": "1.41.2",
34
+ "@adobe/spacecat-shared-data-access": "1.41.3",
35
35
  "jose": "5.6.3"
36
36
  },
37
37
  "devDependencies": {
@@ -36,8 +36,9 @@ export default class ScopedApiKeyHandler extends AbstractHandler {
36
36
  }
37
37
 
38
38
  // Keys are stored by their hash, so we need to hash the key to look it up
39
- const hashedKey = hashWithSHA256(apiKeyFromHeader);
40
- const apiKeyEntity = await dataAccess.getApiKeyByHashedKey(hashedKey);
39
+ const hashedApiKey = hashWithSHA256(apiKeyFromHeader);
40
+ this.log(`Checking for API key with hash: ${hashedApiKey}`, 'debug');
41
+ const apiKeyEntity = await dataAccess.getApiKeyByHashedApiKey(hashedApiKey);
41
42
 
42
43
  if (!apiKeyEntity) {
43
44
  this.log(`No API key entity found in the data layer for the provided API key: ${apiKeyFromHeader}`, 'error');