File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ import {
3030 ResponseError ,
3131 LSPErrorCodes ,
3232 updateConfigurationRequestType ,
33+ GetMfaCodeParams ,
34+ GetMfaCodeResult ,
35+ getMfaCodeRequestType ,
3336} from '@aws/language-server-runtimes/protocol'
3437import {
3538 AuthUtil ,
@@ -342,6 +345,15 @@ async function postStartLanguageServer(
342345 }
343346 )
344347
348+ // Handler for when Flare needs to assume a role with MFA code
349+ client . onRequest < GetMfaCodeParams , GetMfaCodeResult > (
350+ getMfaCodeRequestType . method ,
351+ async ( params : GetMfaCodeParams ) : Promise < GetMfaCodeResult > => {
352+ const mfaCode = await vscode . window . showInputBox ( { title : 'Enter MFA Code' } )
353+ return { code : mfaCode ?? '' }
354+ }
355+ )
356+
345357 const sendProfileToLsp = async ( ) => {
346358 try {
347359 const result = await client . sendRequest ( updateConfigurationRequestType . method , {
You can’t perform that action at this time.
0 commit comments