mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
* replace hardcoded endpoints * cleanup
This commit is contained in:
@@ -341,7 +341,7 @@ export abstract class AzureAuth implements vscode.Disposable {
|
||||
// https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/3687
|
||||
const tokenRequest = {
|
||||
account: account,
|
||||
authority: `https://login.microsoftonline.com/${tenantId}`,
|
||||
authority: `${this.loginEndpointUrl}${tenantId}`,
|
||||
scopes: newScope,
|
||||
forceRefresh: true
|
||||
};
|
||||
@@ -693,7 +693,7 @@ export abstract class AzureAuth implements vscode.Disposable {
|
||||
let accountIssuer = 'unknown';
|
||||
|
||||
if (tokenClaims.iss === 'https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/' ||
|
||||
tokenClaims.iss === 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0') {
|
||||
tokenClaims.iss === `${this.loginEndpointUrl}72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0`) {
|
||||
accountIssuer = Constants.AccountIssuer.Corp;
|
||||
}
|
||||
if (tokenClaims?.idp === 'live.com') {
|
||||
|
||||
@@ -233,7 +233,7 @@ export class AzureAuthCodeGrant extends AzureAuth {
|
||||
codeChallenge: this.pkceCodes.codeChallenge,
|
||||
codeChallengeMethod: this.pkceCodes.challengeMethod,
|
||||
prompt: Constants.SELECT_ACCOUNT,
|
||||
authority: `https://login.microsoftonline.com/${tenant.id}`,
|
||||
authority: `${this.loginEndpointUrl}${tenant.id}`,
|
||||
state: state
|
||||
};
|
||||
let authCodeRequest: AuthorizationCodeRequest;
|
||||
@@ -241,7 +241,7 @@ export class AzureAuthCodeGrant extends AzureAuth {
|
||||
scopes: this.scopes,
|
||||
redirectUri: `${this.redirectUri}:${serverPort}/redirect`,
|
||||
codeVerifier: this.pkceCodes.codeVerifier,
|
||||
authority: `https://login.microsoftonline.com/${tenant.id}`,
|
||||
authority: `${this.loginEndpointUrl}${tenant.id}`,
|
||||
code: ''
|
||||
};
|
||||
let authCodeUrl = await this.clientApplication.getAuthCodeUrl(authUrlRequest);
|
||||
|
||||
@@ -64,7 +64,7 @@ export class AzureDeviceCode extends AzureAuth {
|
||||
|
||||
const deviceCodeRequest: DeviceCodeRequest = {
|
||||
scopes: this.scopes,
|
||||
authority: `https://login.microsoftonline.com/${tenant.id}`,
|
||||
authority: `${this.loginEndpointUrl}${tenant.id}`,
|
||||
deviceCodeCallback: async (response) => {
|
||||
await azdata.accounts.beginAutoOAuthDeviceCode(this.metadata.id, this.pageTitle, response.message, response.userCode, response.verificationUri);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user