File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import * as _read from 'read' ;
2
- import { WebApi , getPersonalAccessTokenHandler } from 'azure-devops-node-api/WebApi' ;
2
+ import { WebApi , getBasicHandler } from 'azure-devops-node-api/WebApi' ;
3
3
import { IGalleryApi , GalleryApi } from 'azure-devops-node-api/GalleryApi' ;
4
4
import * as denodeify from 'denodeify' ;
5
5
import chalk from 'chalk' ;
@@ -23,15 +23,15 @@ export function getPublishedUrl(extension: string): string {
23
23
24
24
export async function getGalleryAPI ( pat : string ) : Promise < IGalleryApi > {
25
25
// from https://github.com/Microsoft/tfs-cli/blob/master/app/exec/extension/default.ts#L287-L292
26
- const authHandler = getPersonalAccessTokenHandler ( pat ) ;
26
+ const authHandler = getBasicHandler ( 'OAuth' , pat ) ;
27
27
return new GalleryApi ( marketplaceUrl , [ authHandler ] ) ;
28
28
29
29
// const vsoapi = new WebApi(marketplaceUrl, authHandler);
30
30
// return await vsoapi.getGalleryApi();
31
31
}
32
32
33
33
export async function getSecurityRolesAPI ( pat : string ) : Promise < ISecurityRolesApi > {
34
- const authHandler = getPersonalAccessTokenHandler ( pat ) ;
34
+ const authHandler = getBasicHandler ( 'OAuth' , pat ) ;
35
35
const vsoapi = new WebApi ( marketplaceUrl , authHandler ) ;
36
36
return await vsoapi . getSecurityRolesApi ( ) ;
37
37
}
You can’t perform that action at this time.
0 commit comments