File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -223,8 +223,15 @@ export async function resolveConnectionSpec(serverName: string): Promise<void> {
223
223
export async function resolvePassword ( serverSpec ) : Promise < void > {
224
224
const AUTHENTICATION_PROVIDER = "intersystems-server-credentials" ;
225
225
// This arises if setting says to use authentication provider
226
- if ( typeof serverSpec . password === "undefined" ) {
227
- const scopes = [ serverSpec . name , serverSpec . username || "" ] ;
226
+ if (
227
+ // Connection isn't unauthenticated
228
+ serverSpec . username != undefined &&
229
+ serverSpec . username != "" &&
230
+ serverSpec . username . toLowerCase ( ) != "unknownuser" &&
231
+ // A password is missing
232
+ typeof serverSpec . password == "undefined"
233
+ ) {
234
+ const scopes = [ serverSpec . name , serverSpec . username ] ;
228
235
let session = await vscode . authentication . getSession ( AUTHENTICATION_PROVIDER , scopes , { silent : true } ) ;
229
236
if ( ! session ) {
230
237
session = await vscode . authentication . getSession ( AUTHENTICATION_PROVIDER , scopes , { createIfNone : true } ) ;
You can’t perform that action at this time.
0 commit comments