@sap-ux/odata-service-inquirer 2.3.7 → 2.3.8
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.
|
@@ -135,7 +135,8 @@ export declare class ConnectionValidator {
|
|
|
135
135
|
/**
|
|
136
136
|
* Setting an existing connected system will prevent re-authentication.
|
|
137
137
|
* This should be used where the user has previously authenticated to prevent re-authentication (e.g. via browser) and the previous
|
|
138
|
-
* connected system is still valid. Only backend systems are currently supported.
|
|
138
|
+
* connected system is still valid. Only Abap connected backend systems are currently supported for cached connection use.
|
|
139
|
+
* For non-Abap backend systems, or basic auth connections, the user will be prompted to re-authenticate.
|
|
139
140
|
*
|
|
140
141
|
* @param connectedSystem A connected system object containing the service provider and backend system information. Not relevant for destination connections.
|
|
141
142
|
* @param connectedSystem.serviceProvider
|
|
@@ -179,14 +179,19 @@ class ConnectionValidator {
|
|
|
179
179
|
/**
|
|
180
180
|
* Setting an existing connected system will prevent re-authentication.
|
|
181
181
|
* This should be used where the user has previously authenticated to prevent re-authentication (e.g. via browser) and the previous
|
|
182
|
-
* connected system is still valid. Only backend systems are currently supported.
|
|
182
|
+
* connected system is still valid. Only Abap connected backend systems are currently supported for cached connection use.
|
|
183
|
+
* For non-Abap backend systems, or basic auth connections, the user will be prompted to re-authenticate.
|
|
183
184
|
*
|
|
184
185
|
* @param connectedSystem A connected system object containing the service provider and backend system information. Not relevant for destination connections.
|
|
185
186
|
* @param connectedSystem.serviceProvider
|
|
186
187
|
* @param connectedSystem.backendSystem
|
|
187
188
|
*/
|
|
188
189
|
setConnectedSystem({ serviceProvider, backendSystem }) {
|
|
189
|
-
// Set the state using the provided ConnectedSystem to prevent re-authentication
|
|
190
|
+
// Set the state using the provided ConnectedSystem to prevent re-authentication if this is a valid AbapServiceProvider connection only
|
|
191
|
+
if (!serviceProvider.catalog) {
|
|
192
|
+
logger_helper_1.default.logger.debug('ConnectionValidator.setConnectedSystem(): Use of a cached connected system is only supported for AbapServiceProviders. Re-authorization will be required.');
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
190
195
|
this._serviceProvider = serviceProvider;
|
|
191
196
|
this._catalogV2 = this._serviceProvider.catalog(axios_extension_1.ODataVersion.v2);
|
|
192
197
|
this._catalogV4 = this._serviceProvider.catalog(axios_extension_1.ODataVersion.v4);
|
|
@@ -61,14 +61,15 @@ function getSystemUrlQuestion(connectValidator, promptNamespace, requiredOdataVe
|
|
|
61
61
|
isSystem: true,
|
|
62
62
|
odataVersion: (0, utils_1.convertODataVersionType)(requiredOdataVersion)
|
|
63
63
|
});
|
|
64
|
-
// If basic auth not required we should have an active connection
|
|
64
|
+
// If basic auth not required we should have an active connection and be authenticated
|
|
65
65
|
if (valResult === true) {
|
|
66
|
-
if (
|
|
66
|
+
if (connectValidator.validity.authenticated && connectValidator.serviceProvider) {
|
|
67
67
|
utils_1.PromptState.odataService.connectedSystem = {
|
|
68
68
|
serviceProvider: (0, utils_1.removeCircularFromServiceProvider)(connectValidator.serviceProvider)
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
72
|
+
// otherwise we need to try basic auth
|
|
72
73
|
connectValidator.systemAuthType = 'basic';
|
|
73
74
|
}
|
|
74
75
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/odata-service-inquirer",
|
|
3
3
|
"description": "Prompts module that can prompt users for inputs required for odata service writing",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.8",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"@types/lodash": "4.14.202",
|
|
48
48
|
"jest-extended": "3.2.4",
|
|
49
49
|
"@sap-ux/fiori-generator-shared": "0.11.2",
|
|
50
|
-
"@sap-ux/fiori-elements-writer": "2.3.
|
|
51
|
-
"@sap-ux/fiori-freestyle-writer": "2.3.
|
|
50
|
+
"@sap-ux/fiori-elements-writer": "2.3.6",
|
|
51
|
+
"@sap-ux/fiori-freestyle-writer": "2.3.4",
|
|
52
52
|
"@sap-ux/feature-toggle": "0.2.3",
|
|
53
|
-
"@sap-ux/odata-service-writer": "0.26.
|
|
53
|
+
"@sap-ux/odata-service-writer": "0.26.17",
|
|
54
54
|
"@sap-ux/cap-config-writer": "0.9.28"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|