File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 44 */
55
66import {
7+ bearerCredentialsUpdateRequestType ,
78 ConnectionMetadata ,
89 NotificationType ,
910 RequestType ,
1011 ResponseMessage ,
12+ UpdateCredentialsParams ,
1113} from '@aws/language-server-runtimes/protocol'
1214import * as jose from 'jose'
1315import * as crypto from 'crypto'
@@ -81,7 +83,7 @@ export class AmazonQLspAuth {
8183 token,
8284 } )
8385
84- await this . client . sendRequest ( notificationTypes . updateBearerToken . method , request )
86+ await this . client . sendRequest ( bearerCredentialsUpdateRequestType . method , request )
8587
8688 this . client . info ( `UpdateBearerToken: ${ JSON . stringify ( request ) } ` )
8789 }
@@ -96,7 +98,7 @@ export class AmazonQLspAuth {
9698 return interval
9799 }
98100
99- private async createUpdateCredentialsRequest ( data : any ) {
101+ private async createUpdateCredentialsRequest ( data : any ) : Promise < UpdateCredentialsParams > {
100102 const payload = new TextEncoder ( ) . encode ( JSON . stringify ( { data } ) )
101103
102104 const jwt = await new jose . CompactEncrypt ( payload )
@@ -105,6 +107,11 @@ export class AmazonQLspAuth {
105107
106108 return {
107109 data : jwt ,
110+ metadata : {
111+ sso : {
112+ startUrl : AuthUtil . instance . auth . startUrl ,
113+ } ,
114+ } ,
108115 encrypted : true ,
109116 }
110117 }
You can’t perform that action at this time.
0 commit comments