@sap-ux/backend-proxy-middleware
Advanced tools
Comparing version 0.6.19 to 0.6.20
@@ -302,12 +302,18 @@ "use strict"; | ||
// check if system credentials are stored in the store | ||
const systemStore = yield store_1.getService({ logger, entityName: 'system' }); | ||
const system = yield systemStore.read(new store_1.BackendSystemKey({ url: localBackend.url, client: localBackend.client })); | ||
if (system) { | ||
yield enhanceConfigForSystem(proxyOptions, system, backend.scp, (refreshToken) => { | ||
if (refreshToken) { | ||
logger.info('Updating refresh token for: ' + localBackend.url); | ||
systemStore.write(Object.assign(Object.assign({}, system), { refreshToken })); | ||
} | ||
}); | ||
try { | ||
const systemStore = yield store_1.getService({ logger, entityName: 'system' }); | ||
const system = yield systemStore.read(new store_1.BackendSystemKey({ url: localBackend.url, client: localBackend.client })); | ||
if (system) { | ||
yield enhanceConfigForSystem(proxyOptions, system, backend.scp, (refreshToken) => { | ||
if (refreshToken) { | ||
logger.info('Updating refresh token for: ' + localBackend.url); | ||
systemStore.write(Object.assign(Object.assign({}, system), { refreshToken })); | ||
} | ||
}); | ||
} | ||
} | ||
catch (error) { | ||
logger.warn('Accessing the credentials store failed.'); | ||
logger.debug(error); | ||
} | ||
} | ||
@@ -314,0 +320,0 @@ if (!proxyOptions.auth && process.env.FIORI_TOOLS_USER && process.env.FIORI_TOOLS_PASSWORD) { |
@@ -12,3 +12,3 @@ { | ||
}, | ||
"version": "0.6.19", | ||
"version": "0.6.20", | ||
"license": "Apache-2.0", | ||
@@ -15,0 +15,0 @@ "author": "@SAP/ux-tools-team", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56358
832
54