Add AuthenticationType enum to typings (#20699)

* Add AuthenticationType enum to typings

* fix

* const

* Add comments

* fix comment

* remove unused
This commit is contained in:
Charles Gagnon
2022-09-30 16:49:36 -07:00
committed by GitHub
parent d6d75d8817
commit 85dc506a3c
49 changed files with 236 additions and 164 deletions

View File

@@ -19,7 +19,6 @@ export class ProviderConnectionInfo extends Disposable implements azdata.Connect
options: { [name: string]: any } = {};
private _providerName?: string;
private static readonly SqlAuthentication = 'SqlLogin';
public static readonly ProviderPropertyName = 'providerName';
public constructor(
@@ -194,7 +193,7 @@ export class ProviderConnectionInfo extends Disposable implements azdata.Connect
option => option.specialValueType === ConnectionOptionSpecialType.password)!; // i guess we are going to assume there is a password field
let isPasswordRequired = optionMetadata.isRequired;
if (this.providerName === Constants.mssqlProviderName) {
isPasswordRequired = this.authenticationType === ProviderConnectionInfo.SqlAuthentication && optionMetadata.isRequired;
isPasswordRequired = this.authenticationType === Constants.AuthenticationType.SqlLogin && optionMetadata.isRequired;
}
return isPasswordRequired;
}