@adobe/spacecat-shared-http-utils 1.6.1 → 1.6.3
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 +14 -0
- package/package.json +2 -2
- package/src/auth/handlers/scoped-api-key.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@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)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* refactor hashedApiKey ([#328](https://github.com/adobe/spacecat-shared/issues/328)) ([7cb8908](https://github.com/adobe/spacecat-shared/commit/7cb8908c13ffede4849fc0bd0b585ce31b4dc79a))
|
|
7
|
+
|
|
8
|
+
# [@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)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* refactor hashed api key and query to retrieve API key ([#325](https://github.com/adobe/spacecat-shared/issues/325)) ([a99fc76](https://github.com/adobe/spacecat-shared/commit/a99fc76963fdcd6bce8de7d5b315dbefbb03fd95))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-http-utils-v1.6.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.6.0...@adobe/spacecat-shared-http-utils-v1.6.1) (2024-08-14)
|
|
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.
|
|
3
|
+
"version": "1.6.3",
|
|
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.
|
|
34
|
+
"@adobe/spacecat-shared-data-access": "1.41.3",
|
|
35
35
|
"jose": "5.6.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
@@ -36,8 +36,8 @@ 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
|
|
40
|
-
const apiKeyEntity = await dataAccess.
|
|
39
|
+
const hashedApiKey = hashWithSHA256(apiKeyFromHeader);
|
|
40
|
+
const apiKeyEntity = await dataAccess.getApiKeyByHashedApiKey(hashedApiKey);
|
|
41
41
|
|
|
42
42
|
if (!apiKeyEntity) {
|
|
43
43
|
this.log(`No API key entity found in the data layer for the provided API key: ${apiKeyFromHeader}`, 'error');
|