@@ -16,7 +16,7 @@ import { IStorageService, StorageScope, StorageTarget } from '../../../../platfo
1616import { IActivityService , NumberBadge } from '../../activity/common/activity.js' ;
1717import { IAuthenticationAccessService } from './authenticationAccessService.js' ;
1818import { 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' ;
2020import { Emitter } from '../../../../base/common/event.js' ;
2121import { IProductService } from '../../../../platform/product/common/productService.js' ;
2222import { ExtensionIdentifier } from '../../../../platform/extensions/common/extensions.js' ;
@@ -287,7 +287,7 @@ export class AuthenticationExtensionsService extends Disposable implements IAuth
287287 /**
288288 * This function should be used only when there are sessions to disambiguate.
289289 */
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 > {
291291 const allAccounts = await this . _authenticationService . getAccounts ( providerId ) ;
292292 if ( ! allAccounts . length ) {
293293 throw new Error ( 'No accounts available' ) ;
@@ -359,7 +359,7 @@ export class AuthenticationExtensionsService extends Disposable implements IAuth
359359 } ) ;
360360 }
361361
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 > {
363363 const providerRequests = this . _sessionAccessRequestItems . get ( provider . id ) || { } ;
364364 const existingRequest = providerRequests [ extensionId ] ;
365365 if ( ! existingRequest ) {
@@ -390,7 +390,7 @@ export class AuthenticationExtensionsService extends Disposable implements IAuth
390390 }
391391 }
392392
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 {
394394 const providerRequests = this . _sessionAccessRequestItems . get ( providerId ) || { } ;
395395 const hasExistingRequest = providerRequests [ extensionId ] ;
396396 if ( hasExistingRequest ) {
@@ -424,7 +424,7 @@ export class AuthenticationExtensionsService extends Disposable implements IAuth
424424 this . updateBadgeCount ( ) ;
425425 }
426426
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 > {
428428 if ( ! this . _authenticationService . isAuthenticationProviderRegistered ( providerId ) ) {
429429 // Activate has already been called for the authentication provider, but it cannot block on registering itself
430430 // 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
447447 }
448448
449449 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 ) ?? '' } `
452452 : `${ scopeListOrRequest . join ( SCOPESLIST_SEPARATOR ) } ` ;
453453 const extensionHasExistingRequest = providerRequests
454454 && providerRequests [ signInRequestKey ]
0 commit comments