Skip to content

Commit 54dcdaf

Browse files
committed
fix getting account info
1 parent 627ba41 commit 54dcdaf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reverse_engineering/api.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,16 +553,16 @@ function getTTL(defaultTTL) {
553553
}
554554

555555
async function getAdditionalAccountInfo(connectionInfo, logger) {
556-
if (connectionInfo.disableSSL || !connectionInfo.includeAccountInformation) {
556+
if (!connectionInfo.includeAccountInformation) {
557557
return {};
558558
}
559559

560560
logger.log('info', {}, 'Account additional info', connectionInfo.hiddenKeys);
561561

562562
try {
563-
const { clientId, appSecret, tenantId, subscriptionId, resourceGroupName, host } = connectionInfo;
564-
const accNameRegex = /wss:\/\/(.+)\.gremlinEndpoint.+/i;
565-
const accountName = accNameRegex.test(host) ? accNameRegex.exec(host)[1] : '';
563+
const { clientId, appSecret, tenantId, subscriptionId, resourceGroupName, gremlinEndpoint } = connectionInfo;
564+
const accNameRegex = /wss:\/\/(.+)\.gremlin.+/i;
565+
const accountName = accNameRegex.test(gremlinEndpoint) ? accNameRegex.exec(gremlinEndpoint)[1] : '';
566566
const tokenBaseURl = `https://login.microsoftonline.com/${tenantId}/oauth2/token`;
567567
const { data: tokenData } = await axios({
568568
method: 'post',

0 commit comments

Comments
 (0)