Prompt for consent when interaction is required (#10373)

* Reprompt for consent

* Remove unused imports

* Fix typos

* Change the tenant we re-auth too

* Handle the prompt properly

* prompt for consent dialog

* Information message modal

* product name

* Change message per PM feedback
This commit is contained in:
Amir Omidi
2020-05-21 00:03:21 -07:00
committed by GitHub
parent efb890697c
commit 65a4a56fd7
4 changed files with 126 additions and 63 deletions

View File

@@ -8,17 +8,22 @@ import * as os from 'os';
import 'mocha';
import { PromptFailedResult, AccountKey } from 'azdata';
import { AzureAuth, AccessToken, RefreshToken, TokenClaims } from '../../../account-provider/auths/azureAuth';
import { AzureAccount, AzureAuthType } from '../../../account-provider/interfaces';
import { AzureAuth, AccessToken, RefreshToken, TokenClaims, TokenRefreshResponse } from '../../../account-provider/auths/azureAuth';
import { AzureAccount, AzureAuthType, Deferred } from '../../../account-provider/interfaces';
import providerSettings from '../../../account-provider/providerSettings';
import { SimpleTokenCache } from '../../../account-provider/simpleTokenCache';
import { CredentialsTestProvider } from '../../stubs/credentialsTestProvider';
class BasicAzureAuth extends AzureAuth {
public login(): Promise<AzureAccount | PromptFailedResult> {
public async login(): Promise<AzureAccount | PromptFailedResult> {
throw new Error('Method not implemented.');
}
public autoOAuthCancelled(): Promise<void> {
public async autoOAuthCancelled(): Promise<void> {
throw new Error('Method not implemented.');
}
public async promptForConsent(): Promise<{ tokenRefreshResponse: TokenRefreshResponse, authCompleteDeferred: Deferred<void> } | undefined> {
throw new Error('Method not implemented.');
}
}