@@ -9,8 +9,8 @@ import { storePassword, clearPassword } from './commands/managePasswords';
99import { importFromRegistry } from './commands/importFromRegistry' ;
1010import { ServerManagerView , ServerTreeItem , SMTreeItem } from './ui/serverManagerView' ;
1111import { addServer } from './api/addServer' ;
12- import { getPortalUriWithCredentials } from './api/getPortalUriWithCredentials' ;
1312import { getServerSummary } from './api/getServerSummary' ;
13+ import { getPortalUriWithToken } from './api/getPortalUriWithToken' ;
1414
1515export interface ServerName {
1616 name : string ,
@@ -78,9 +78,9 @@ export function activate(context: vscode.ExtensionContext) {
7878 context . subscriptions . push (
7979 vscode . commands . registerCommand ( `${ extensionId } .openPortalExternal` , ( server ?: ServerTreeItem ) => {
8080 if ( server ?. contextValue ?. match ( / \. s e r v e r \. / ) && server . name ) {
81- getPortalUriWithCredentials ( server . name ) . then ( ( uriWithCredentials ) => {
82- if ( uriWithCredentials ) {
83- vscode . env . openExternal ( uriWithCredentials ) ;
81+ getPortalUriWithToken ( server . name ) . then ( ( uriWithToken ) => {
82+ if ( uriWithToken ) {
83+ vscode . env . openExternal ( uriWithToken ) ;
8484 }
8585 } ) ;
8686 }
@@ -89,13 +89,12 @@ export function activate(context: vscode.ExtensionContext) {
8989 context . subscriptions . push (
9090 vscode . commands . registerCommand ( `${ extensionId } .openPortalTab` , ( server ?: ServerTreeItem ) => {
9191 if ( server ?. contextValue ?. match ( / \. s e r v e r \. / ) && server . name ) {
92- getPortalUriWithCredentials ( server . name ) . then ( ( uriWithCredentials ) => {
93- if ( uriWithCredentials ) {
94- //vscode.commands.executeCommand('simpleBrowser.api.open', uriWithCredentials);
92+ getPortalUriWithToken ( server . name ) . then ( ( uriWithToken ) => {
93+ if ( uriWithToken ) {
9594 //
9695 // It is essential to pass skipEncoding=true when converting the uri to a string,
9796 // otherwise the encoding done within Simple Browser / webview causes double-encoding of the querystring.
98- vscode . commands . executeCommand ( 'simpleBrowser.show' , uriWithCredentials . toString ( true ) ) ;
97+ vscode . commands . executeCommand ( 'simpleBrowser.show' , uriWithToken . toString ( true ) ) ;
9998 }
10099 } ) ;
101100 }
0 commit comments