@adobe/spacecat-shared-http-utils 1.17.3 → 1.17.5
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 +1 -1
- package/src/auth/handlers/ims.js +5 -1
- package/src/auth/handlers/jwt.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-http-utils-v1.17.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.17.4...@adobe/spacecat-shared-http-utils-v1.17.5) (2025-09-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* track IMS handler usage ([#979](https://github.com/adobe/spacecat-shared/issues/979)) ([ba09d1d](https://github.com/adobe/spacecat-shared/commit/ba09d1d4510ffd8f4518edb0738db451b11d133a))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-http-utils-v1.17.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.17.3...@adobe/spacecat-shared-http-utils-v1.17.4) (2025-09-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add entitlement in scope ([#973](https://github.com/adobe/spacecat-shared/issues/973)) ([2837acf](https://github.com/adobe/spacecat-shared/commit/2837acf2acaaefb663ef0a42855474706ce25d06))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-http-utils-v1.17.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.17.2...@adobe/spacecat-shared-http-utils-v1.17.3) (2025-09-15)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/auth/handlers/ims.js
CHANGED
|
@@ -61,7 +61,6 @@ const transformProfile = (payload) => {
|
|
|
61
61
|
|
|
62
62
|
profile.email = payload.user_id;
|
|
63
63
|
profile.trial_email = payload.email;
|
|
64
|
-
profile.provider = 'IMS';
|
|
65
64
|
profile.first_name = payload.first_name;
|
|
66
65
|
profile.last_name = payload.last_name;
|
|
67
66
|
IGNORED_PROFILE_PROPS.forEach((prop) => delete profile[prop]);
|
|
@@ -146,6 +145,11 @@ export default class AdobeImsHandler extends AbstractHandler {
|
|
|
146
145
|
}
|
|
147
146
|
|
|
148
147
|
async checkAuth(request, context) {
|
|
148
|
+
// Log to trace usage of IMS handler
|
|
149
|
+
const { pathInfo } = context;
|
|
150
|
+
const { method, suffix } = pathInfo;
|
|
151
|
+
const route = `${method.toUpperCase()} ${suffix}`;
|
|
152
|
+
this.log(`Checking authentication with IMS for product ${pathInfo.headers['x-product']} at route ${route}`, 'debug');
|
|
149
153
|
const token = getBearerToken(context);
|
|
150
154
|
if (!hasText(token)) {
|
|
151
155
|
this.log('No bearer token provided', 'debug');
|
package/src/auth/handlers/jwt.js
CHANGED
|
@@ -72,7 +72,9 @@ export default class JwtHandler extends AbstractHandler {
|
|
|
72
72
|
const scopes = payload.is_admin ? [{ name: 'admin' }] : [];
|
|
73
73
|
|
|
74
74
|
scopes.push(...payload.tenants.map(
|
|
75
|
-
(tenant) => ({
|
|
75
|
+
(tenant) => ({
|
|
76
|
+
name: 'user', domains: [tenant.id], subScopes: tenant?.subServices || [], entitlement: tenant?.entitlement || {},
|
|
77
|
+
}),
|
|
76
78
|
));
|
|
77
79
|
|
|
78
80
|
return new AuthInfo()
|