@adobe/spacecat-shared-http-utils 1.10.1 → 1.10.2
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,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-http-utils-v1.10.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.10.1...@adobe/spacecat-shared-http-utils-v1.10.2) (2025-04-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix auth for dev ([#676](https://github.com/adobe/spacecat-shared/issues/676)) ([1508d58](https://github.com/adobe/spacecat-shared/commit/1508d5843a753685a7f35c0d18a020a991b94d25))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-http-utils-v1.10.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.10.0...@adobe/spacecat-shared-http-utils-v1.10.1) (2025-04-01)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/auth/handlers/ims.js
CHANGED
|
@@ -18,8 +18,6 @@ import {
|
|
|
18
18
|
jwtVerify,
|
|
19
19
|
} from 'jose';
|
|
20
20
|
|
|
21
|
-
import configProd from './config/ims.js';
|
|
22
|
-
import configDev from './config/ims-stg.js';
|
|
23
21
|
import { getBearerToken } from './utils/bearer.js';
|
|
24
22
|
|
|
25
23
|
import AbstractHandler from './abstract.js';
|
|
@@ -40,11 +38,13 @@ const IGNORED_PROFILE_PROPS = [
|
|
|
40
38
|
];
|
|
41
39
|
|
|
42
40
|
const loadConfig = (context) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
try {
|
|
42
|
+
const config = JSON.parse(context.env.AUTH_HANDLER_IMS);
|
|
43
|
+
return config;
|
|
44
|
+
} catch (e) {
|
|
45
|
+
context.log.error(`Failed to load config from context: ${e.message}`);
|
|
46
|
+
throw Error('Failed to load config from context');
|
|
47
|
+
}
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
const transformProfile = (payload) => {
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2024 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
export default {
|
|
13
|
-
name: 'ims-na1-stg1',
|
|
14
|
-
discoveryUrl: 'https://ims-na1-stg1.adobelogin.com/ims/.well-known/openid-configuration',
|
|
15
|
-
// todo: fetch from discovery document
|
|
16
|
-
discovery: {
|
|
17
|
-
issuer: 'https://ims-na1-stg1.adobelogin.com',
|
|
18
|
-
authorization_endpoint: 'https://ims-na1-stg1.adobelogin.com/ims/authorize/v2',
|
|
19
|
-
token_endpoint: 'https://ims-na1-stg1.adobelogin.com/ims/token/v3',
|
|
20
|
-
userinfo_endpoint: 'https://ims-na1-stg1.adobelogin.com/ims/userinfo/v2',
|
|
21
|
-
revocation_endpoint: 'https://ims-na1-stg1.adobelogin.com/ims/revoke',
|
|
22
|
-
jwks_uri: 'https://ims-na1-stg1.adobelogin.com/ims/keys',
|
|
23
|
-
},
|
|
24
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2024 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
export default {
|
|
13
|
-
name: 'ims-na1',
|
|
14
|
-
discoveryUrl: 'https://ims-na1.adobelogin.com/ims/.well-known/openid-configuration',
|
|
15
|
-
discovery: {
|
|
16
|
-
issuer: 'https://ims-na1.adobelogin.com',
|
|
17
|
-
authorization_endpoint: 'https://ims-na1.adobelogin.com/ims/authorize/v2',
|
|
18
|
-
token_endpoint: 'https://ims-na1.adobelogin.com/ims/token/v3',
|
|
19
|
-
userinfo_endpoint: 'https://ims-na1.adobelogin.com/ims/userinfo/v2',
|
|
20
|
-
revocation_endpoint: 'https://ims-na1.adobelogin.com/ims/revoke',
|
|
21
|
-
jwks_uri: 'https://ims-na1.adobelogin.com/ims/keys',
|
|
22
|
-
},
|
|
23
|
-
};
|