File tree Expand file tree Collapse file tree
github-authentication/src
contrib/userDataSync/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export class GitHubAuthenticationProvider {
7171 id : session . id ,
7272 accountName : session . accountName ,
7373 scopes : session . scopes ,
74- accessToken : ( ) => Promise . resolve ( session . accessToken )
74+ getAccessToken : ( ) => Promise . resolve ( session . accessToken )
7575 } ;
7676 } ) ;
7777 } catch ( e ) {
@@ -84,7 +84,7 @@ export class GitHubAuthenticationProvider {
8484
8585 private async storeSessions ( ) : Promise < void > {
8686 const sessionData : SessionData [ ] = await Promise . all ( this . _sessions . map ( async session => {
87- const resolvedAccessToken = await session . accessToken ( ) ;
87+ const resolvedAccessToken = await session . getAccessToken ( ) ;
8888 return {
8989 id : session . id ,
9090 accountName : session . accountName ,
@@ -111,7 +111,7 @@ export class GitHubAuthenticationProvider {
111111 const userInfo = await this . _githubServer . getUserInfo ( token ) ;
112112 return {
113113 id : userInfo . id ,
114- accessToken : ( ) => Promise . resolve ( token ) ,
114+ getAccessToken : ( ) => Promise . resolve ( token ) ,
115115 accountName : userInfo . accountName ,
116116 scopes : scopes
117117 } ;
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ export class AzureActiveDirectoryService {
184184 private convertToSession ( token : IToken ) : vscode . AuthenticationSession {
185185 return {
186186 id : token . sessionId ,
187- accessToken : ( ) => this . resolveAccessToken ( token ) ,
187+ getAccessToken : ( ) => this . resolveAccessToken ( token ) ,
188188 accountName : token . accountName ,
189189 scopes : token . scope . split ( ' ' )
190190 } ;
Original file line number Diff line number Diff line change @@ -1373,7 +1373,7 @@ export interface RenameProvider {
13731373 */
13741374export interface AuthenticationSession {
13751375 id : string ;
1376- accessToken ( ) : Thenable < string > ;
1376+ getAccessToken ( ) : Thenable < string > ;
13771377 accountName : string ;
13781378}
13791379
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ declare module 'vscode' {
2020
2121 export interface AuthenticationSession {
2222 id : string ;
23- accessToken ( ) : Thenable < string > ;
23+ getAccessToken ( ) : Thenable < string > ;
2424 accountName : string ;
2525 scopes : string [ ]
2626 }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export class MainThreadAuthenticationProvider {
2525 return {
2626 id : session . id ,
2727 accountName : session . accountName ,
28- accessToken : ( ) => this . _proxy . $getSessionAccessToken ( this . id , session . id )
28+ getAccessToken : ( ) => this . _proxy . $getSessionAccessToken ( this . id , session . id )
2929 } ;
3030 } ) ;
3131 }
@@ -35,7 +35,7 @@ export class MainThreadAuthenticationProvider {
3535 return {
3636 id : session . id ,
3737 accountName : session . accountName ,
38- accessToken : ( ) => this . _proxy . $getSessionAccessToken ( this . id , session . id )
38+ getAccessToken : ( ) => this . _proxy . $getSessionAccessToken ( this . id , session . id )
3939 } ;
4040 } ) ;
4141 }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export class AuthenticationProviderWrapper implements vscode.AuthenticationProvi
3434 id : session . id ,
3535 accountName : session . accountName ,
3636 scopes : session . scopes ,
37- accessToken : async ( ) => {
37+ getAccessToken : async ( ) => {
3838 const isAllowed = await this . _proxy . $getSessionsPrompt (
3939 this . _provider . id ,
4040 this . displayName ,
@@ -45,7 +45,7 @@ export class AuthenticationProviderWrapper implements vscode.AuthenticationProvi
4545 throw new Error ( 'User did not consent to token access.' ) ;
4646 }
4747
48- return session . accessToken ( ) ;
48+ return session . getAccessToken ( ) ;
4949 }
5050 } ;
5151 } ) ;
@@ -137,7 +137,7 @@ export class ExtHostAuthentication implements ExtHostAuthenticationShape {
137137 const sessions = await authProvider . getSessions ( ) ;
138138 const session = sessions . find ( session => session . id === sessionId ) ;
139139 if ( session ) {
140- return session . accessToken ( ) ;
140+ return session . getAccessToken ( ) ;
141141 }
142142
143143 throw new Error ( `Unable to find session with id: ${ sessionId } ` ) ;
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
226226
227227 if ( account ) {
228228 try {
229- const token = await account . accessToken ( ) ;
229+ const token = await account . getAccessToken ( ) ;
230230 this . authTokenService . setToken ( token ) ;
231231 this . authenticationState . set ( AuthStatus . SignedIn ) ;
232232 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments