Enable SQL Auth Provider support (#21903)

This commit is contained in:
Cheena Malhotra
2023-03-03 12:49:01 -08:00
committed by GitHub
parent 0ac6f40559
commit aa350f7e49
25 changed files with 198 additions and 59 deletions

View File

@@ -135,6 +135,12 @@ export interface IConnectionManagementService {
*/
findExistingConnection(connection: IConnectionProfile, purpose?: 'dashboard' | 'insights' | 'connection'): ConnectionProfile;
/**
* Fixes treeItem payload to consider defaultAuthenticationType and any other user settings.
* @param profile Connection profile as received from treeItem.
*/
fixProfile(profile?: azdata.IConnectionProfile): Promise<azdata.IConnectionProfile>;
/**
* If there's already a connection for given profile and purpose, returns the ownerUri for the connection
* otherwise tries to make a connection and returns the owner uri when connection is complete

View File

@@ -170,6 +170,10 @@ export class TestConnectionManagementService implements IConnectionManagementSer
return undefined!;
}
async fixProfile(profile?: IConnectionProfile): Promise<IConnectionProfile> {
return profile;
}
connect(connection: IConnectionProfile, uri: string, options?: IConnectionCompletionOptions, callbacks?: IConnectionCallbacks): Promise<IConnectionResult> {
return new Promise<IConnectionResult>((resolve, reject) => {
resolve({ connected: true, errorMessage: undefined!, errorCode: undefined!, messageDetails: undefined! });