@adobe/spacecat-shared-utils 1.41.3 → 1.42.0
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 +7 -0
- package/package.json +2 -2
- package/src/auth.js +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-utils-v1.42.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.41.3...@adobe/spacecat-shared-utils-v1.42.0) (2025-06-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* introduce page authentication for authoring type ([#829](https://github.com/adobe/spacecat-shared/issues/829)) ([86ec166](https://github.com/adobe/spacecat-shared/commit/86ec16621c9088a77d1cd9ac15430a3e087cd00c))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-utils-v1.41.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.41.2...@adobe/spacecat-shared-utils-v1.41.3) (2025-06-24)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.0",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@adobe/fetch": "4.2.2",
|
|
48
|
-
"@adobe/spacecat-shared-data-access": "2.0
|
|
48
|
+
"@adobe/spacecat-shared-data-access": "2.31.0",
|
|
49
49
|
"@adobe/spacecat-shared-ims-client": "1.8.3",
|
|
50
50
|
"@aws-sdk/client-s3": "3.832.0",
|
|
51
51
|
"@aws-sdk/client-secrets-manager": "3.830.0",
|
package/src/auth.js
CHANGED
|
@@ -51,7 +51,11 @@ export async function getAccessToken(context, promiseToken) {
|
|
|
51
51
|
* @throws {Error} - If secret is not found or token is missing
|
|
52
52
|
*/
|
|
53
53
|
export async function retrievePageAuthentication(site, context, authOptions = {}) {
|
|
54
|
-
|
|
54
|
+
const CS_TYPES = [Site.AUTHORING_TYPES.CS, Site.AUTHORING_TYPES.CS_CW];
|
|
55
|
+
if (site
|
|
56
|
+
&& (CS_TYPES.includes(site.getAuthoringType())
|
|
57
|
+
|| site.getDeliveryType() === Site.DELIVERY_TYPES.AEM_CS)
|
|
58
|
+
&& authOptions.promiseToken) {
|
|
55
59
|
return getAccessToken(context, authOptions.promiseToken.promise_token);
|
|
56
60
|
}
|
|
57
61
|
|