@@ -16,7 +16,7 @@ import { IStorageService, StorageScope, StorageTarget } from '../../../../platfo
16
16
import { IActivityService , NumberBadge } from '../../activity/common/activity.js' ;
17
17
import { IAuthenticationAccessService } from './authenticationAccessService.js' ;
18
18
import { IAuthenticationUsageService } from './authenticationUsageService.js' ;
19
- import { AuthenticationSession , IAuthenticationProvider , IAuthenticationService , IAuthenticationExtensionsService , AuthenticationSessionAccount , IAuthenticationSessionRequest , isAuthenticationSessionRequest } from '../common/authentication.js' ;
19
+ import { AuthenticationSession , IAuthenticationProvider , IAuthenticationService , IAuthenticationExtensionsService , AuthenticationSessionAccount , IAuthenticationWWWAuthenticateRequest , isAuthenticationWWWAuthenticateRequest } from '../common/authentication.js' ;
20
20
import { Emitter } from '../../../../base/common/event.js' ;
21
21
import { IProductService } from '../../../../platform/product/common/productService.js' ;
22
22
import { ExtensionIdentifier } from '../../../../platform/extensions/common/extensions.js' ;
@@ -287,7 +287,7 @@ export class AuthenticationExtensionsService extends Disposable implements IAuth
287
287
/**
288
288
* This function should be used only when there are sessions to disambiguate.
289
289
*/
290
- async selectSession ( providerId : string , extensionId : string , extensionName : string , scopeListOrRequest : ReadonlyArray < string > | IAuthenticationSessionRequest , availableSessions : AuthenticationSession [ ] ) : Promise < AuthenticationSession > {
290
+ async selectSession ( providerId : string , extensionId : string , extensionName : string , scopeListOrRequest : ReadonlyArray < string > | IAuthenticationWWWAuthenticateRequest , availableSessions : AuthenticationSession [ ] ) : Promise < AuthenticationSession > {
291
291
const allAccounts = await this . _authenticationService . getAccounts ( providerId ) ;
292
292
if ( ! allAccounts . length ) {
293
293
throw new Error ( 'No accounts available' ) ;
@@ -359,7 +359,7 @@ export class AuthenticationExtensionsService extends Disposable implements IAuth
359
359
} ) ;
360
360
}
361
361
362
- private async completeSessionAccessRequest ( provider : IAuthenticationProvider , extensionId : string , extensionName : string , scopeListOrRequest : ReadonlyArray < string > | IAuthenticationSessionRequest ) : Promise < void > {
362
+ private async completeSessionAccessRequest ( provider : IAuthenticationProvider , extensionId : string , extensionName : string , scopeListOrRequest : ReadonlyArray < string > | IAuthenticationWWWAuthenticateRequest ) : Promise < void > {
363
363
const providerRequests = this . _sessionAccessRequestItems . get ( provider . id ) || { } ;
364
364
const existingRequest = providerRequests [ extensionId ] ;
365
365
if ( ! existingRequest ) {
@@ -390,7 +390,7 @@ export class AuthenticationExtensionsService extends Disposable implements IAuth
390
390
}
391
391
}
392
392
393
- requestSessionAccess ( providerId : string , extensionId : string , extensionName : string , scopeListOrRequest : ReadonlyArray < string > | IAuthenticationSessionRequest , possibleSessions : AuthenticationSession [ ] ) : void {
393
+ requestSessionAccess ( providerId : string , extensionId : string , extensionName : string , scopeListOrRequest : ReadonlyArray < string > | IAuthenticationWWWAuthenticateRequest , possibleSessions : AuthenticationSession [ ] ) : void {
394
394
const providerRequests = this . _sessionAccessRequestItems . get ( providerId ) || { } ;
395
395
const hasExistingRequest = providerRequests [ extensionId ] ;
396
396
if ( hasExistingRequest ) {
@@ -424,7 +424,7 @@ export class AuthenticationExtensionsService extends Disposable implements IAuth
424
424
this . updateBadgeCount ( ) ;
425
425
}
426
426
427
- async requestNewSession ( providerId : string , scopeListOrRequest : ReadonlyArray < string > | IAuthenticationSessionRequest , extensionId : string , extensionName : string ) : Promise < void > {
427
+ async requestNewSession ( providerId : string , scopeListOrRequest : ReadonlyArray < string > | IAuthenticationWWWAuthenticateRequest , extensionId : string , extensionName : string ) : Promise < void > {
428
428
if ( ! this . _authenticationService . isAuthenticationProviderRegistered ( providerId ) ) {
429
429
// Activate has already been called for the authentication provider, but it cannot block on registering itself
430
430
// since this is sync and returns a disposable. So, wait for registration event to fire that indicates the
@@ -447,8 +447,8 @@ export class AuthenticationExtensionsService extends Disposable implements IAuth
447
447
}
448
448
449
449
const providerRequests = this . _signInRequestItems . get ( providerId ) ;
450
- const signInRequestKey = isAuthenticationSessionRequest ( scopeListOrRequest )
451
- ? `${ scopeListOrRequest . challenge } :${ scopeListOrRequest . scopes ?. join ( SCOPESLIST_SEPARATOR ) ?? '' } `
450
+ const signInRequestKey = isAuthenticationWWWAuthenticateRequest ( scopeListOrRequest )
451
+ ? `${ scopeListOrRequest . wwwAuthenticate } :${ scopeListOrRequest . scopes ?. join ( SCOPESLIST_SEPARATOR ) ?? '' } `
452
452
: `${ scopeListOrRequest . join ( SCOPESLIST_SEPARATOR ) } ` ;
453
453
const extensionHasExistingRequest = providerRequests
454
454
&& providerRequests [ signInRequestKey ]
0 commit comments