azure aith wip

This commit is contained in:
Jan Prochazka
2024-08-02 15:12:38 +02:00
parent fc448ed578
commit 112513a569
6 changed files with 13 additions and 5 deletions

View File

@@ -389,7 +389,7 @@ module.exports = {
const { conid } = req.query;
const connection = await this.getCore({ conid });
const driver = requireEngineDriver(connection);
const authUrl = driver.getRedirectAuthUrl(connection);
const authUrl = await driver.getRedirectAuthUrl(connection);
res.redirect(authUrl);
},
};

View File

@@ -56,7 +56,10 @@ module.exports = {
if (connection.passwordMode == 'askPassword' || connection.passwordMode == 'askUser') {
throw new MissingCredentialsError({ conid, passwordMode: connection.passwordMode });
}
const subprocess = fork(
if (connection.useRedirectDbLogin) {
throw new MissingCredentialsError({ conid, redirectToDbLogin: true });
}
const subprocess = fork(
global['API_PACKAGE'] || process.argv[1],
[
'--is-forked-api',

View File

@@ -67,7 +67,7 @@ module.exports = function useController(app, electron, route, controller) {
}
if (raw) {
router[method](routeAction, controller[key]);
router[method](routeAction, (req, res) => controller[key](req, res));
} else {
router[method](routeAction, async (req, res) => {
// if (controller._init && !controller._init_called) {