mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-16 03:21:39 -04:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f0960d0e7 | ||
|
|
680d12163d | ||
|
|
a90591b881 |
@@ -341,7 +341,7 @@ export abstract class AzureAuth implements vscode.Disposable {
|
|||||||
// https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/3687
|
// https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/3687
|
||||||
const tokenRequest = {
|
const tokenRequest = {
|
||||||
account: account,
|
account: account,
|
||||||
authority: `https://login.microsoftonline.com/${tenantId}`,
|
authority: `${this.loginEndpointUrl}${tenantId}`,
|
||||||
scopes: newScope,
|
scopes: newScope,
|
||||||
forceRefresh: true
|
forceRefresh: true
|
||||||
};
|
};
|
||||||
@@ -693,7 +693,7 @@ export abstract class AzureAuth implements vscode.Disposable {
|
|||||||
let accountIssuer = 'unknown';
|
let accountIssuer = 'unknown';
|
||||||
|
|
||||||
if (tokenClaims.iss === 'https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/' ||
|
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;
|
accountIssuer = Constants.AccountIssuer.Corp;
|
||||||
}
|
}
|
||||||
if (tokenClaims?.idp === 'live.com') {
|
if (tokenClaims?.idp === 'live.com') {
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ export class AzureAuthCodeGrant extends AzureAuth {
|
|||||||
codeChallenge: this.pkceCodes.codeChallenge,
|
codeChallenge: this.pkceCodes.codeChallenge,
|
||||||
codeChallengeMethod: this.pkceCodes.challengeMethod,
|
codeChallengeMethod: this.pkceCodes.challengeMethod,
|
||||||
prompt: Constants.SELECT_ACCOUNT,
|
prompt: Constants.SELECT_ACCOUNT,
|
||||||
authority: `https://login.microsoftonline.com/${tenant.id}`,
|
authority: `${this.loginEndpointUrl}${tenant.id}`,
|
||||||
state: state
|
state: state
|
||||||
};
|
};
|
||||||
let authCodeRequest: AuthorizationCodeRequest;
|
let authCodeRequest: AuthorizationCodeRequest;
|
||||||
@@ -241,7 +241,7 @@ export class AzureAuthCodeGrant extends AzureAuth {
|
|||||||
scopes: this.scopes,
|
scopes: this.scopes,
|
||||||
redirectUri: `${this.redirectUri}:${serverPort}/redirect`,
|
redirectUri: `${this.redirectUri}:${serverPort}/redirect`,
|
||||||
codeVerifier: this.pkceCodes.codeVerifier,
|
codeVerifier: this.pkceCodes.codeVerifier,
|
||||||
authority: `https://login.microsoftonline.com/${tenant.id}`,
|
authority: `${this.loginEndpointUrl}${tenant.id}`,
|
||||||
code: ''
|
code: ''
|
||||||
};
|
};
|
||||||
let authCodeUrl = await this.clientApplication.getAuthCodeUrl(authUrlRequest);
|
let authCodeUrl = await this.clientApplication.getAuthCodeUrl(authUrlRequest);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export class AzureDeviceCode extends AzureAuth {
|
|||||||
|
|
||||||
const deviceCodeRequest: DeviceCodeRequest = {
|
const deviceCodeRequest: DeviceCodeRequest = {
|
||||||
scopes: this.scopes,
|
scopes: this.scopes,
|
||||||
authority: `https://login.microsoftonline.com/${tenant.id}`,
|
authority: `${this.loginEndpointUrl}${tenant.id}`,
|
||||||
deviceCodeCallback: async (response) => {
|
deviceCodeCallback: async (response) => {
|
||||||
await azdata.accounts.beginAutoOAuthDeviceCode(this.metadata.id, this.pageTitle, response.message, response.userCode, response.verificationUri);
|
await azdata.accounts.beginAutoOAuthDeviceCode(this.metadata.id, this.pageTitle, response.message, response.userCode, response.verificationUri);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,6 +196,28 @@ function getClientOptions(context: AppContext): ClientOptions {
|
|||||||
ExecutionPlanServiceFeature,
|
ExecutionPlanServiceFeature,
|
||||||
TdeMigrationService.asFeature(context),
|
TdeMigrationService.asFeature(context),
|
||||||
],
|
],
|
||||||
outputChannel: outputChannel
|
outputChannel: new CustomOutputChannel()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CustomOutputChannel implements vscode.OutputChannel {
|
||||||
|
name: string;
|
||||||
|
append(value: string): void {
|
||||||
|
console.log(value);
|
||||||
|
}
|
||||||
|
appendLine(value: string): void {
|
||||||
|
console.log(value);
|
||||||
|
}
|
||||||
|
clear(): void {
|
||||||
|
}
|
||||||
|
show(preserveFocus?: boolean): void;
|
||||||
|
show(column?: vscode.ViewColumn, preserveFocus?: boolean): void;
|
||||||
|
show(column?: any, preserveFocus?: any) {
|
||||||
|
}
|
||||||
|
hide(): void {
|
||||||
|
}
|
||||||
|
dispose(): void {
|
||||||
|
}
|
||||||
|
replace(_value: string): void {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "azuredatastudio",
|
"name": "azuredatastudio",
|
||||||
"version": "1.41.1",
|
"version": "1.41.2",
|
||||||
"distro": "c6da977529b6719ff1974faa53a73abe01ec13ac",
|
"distro": "c6da977529b6719ff1974faa53a73abe01ec13ac",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Microsoft Corporation"
|
"name": "Microsoft Corporation"
|
||||||
|
|||||||
Reference in New Issue
Block a user