mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 15:36:28 +00:00
azure auth - moved from plugin into API
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
"dbgate"
|
||||
],
|
||||
"dependencies": {
|
||||
"@azure/msal-node": "^2.12.0",
|
||||
"activedirectory2": "^2.1.0",
|
||||
"async-lock": "^1.2.4",
|
||||
"axios": "^0.21.1",
|
||||
|
||||
@@ -3,6 +3,7 @@ const fs = require('fs');
|
||||
const { pluginsdir, packagedPluginsDir, getPluginBackendPath } = require('../utility/directories');
|
||||
const nativeModules = require('../nativeModules');
|
||||
const platformInfo = require('../utility/platformInfo');
|
||||
const azureAuth = require('../utility/azureAuth');
|
||||
const { getLogger } = require('dbgate-tools');
|
||||
const logger = getLogger('requirePlugin');
|
||||
|
||||
@@ -12,6 +13,7 @@ const dbgateEnv = {
|
||||
dbgateApi: null,
|
||||
nativeModules,
|
||||
platformInfo,
|
||||
azureAuth,
|
||||
};
|
||||
function requirePlugin(packageName, requiredPlugin = null) {
|
||||
if (!packageName) throw new Error('Missing packageName in plugin');
|
||||
|
||||
17
packages/api/src/utility/azureAuth.js
Normal file
17
packages/api/src/utility/azureAuth.js
Normal file
@@ -0,0 +1,17 @@
|
||||
function isAzureAuthSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
async function azureGetRedirectAuthUrl(options) {
|
||||
return null;
|
||||
}
|
||||
|
||||
async function azureGetAuthTokenFromCode(options) {
|
||||
return null;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isAzureAuthSupported,
|
||||
azureGetRedirectAuthUrl,
|
||||
azureGetAuthTokenFromCode,
|
||||
};
|
||||
Reference in New Issue
Block a user