// ĠCopyright Ġ 2 0 1 9 ĠAmazon . com , ĠInc . Ġor Ġits Ġaffiliates . ĠAll ĠRights ĠReserved . Ċ // ĠSPDX - License - Identifier : ĠApache - 2 . 0 Ċ Ċ package Ġsoftware . aws . tool k its . jetbrains . core . credentials Ċ Ċ import Ġsoftware . amazon . aw ssdk . auth . credentials . Aws Credentials Ċ import Ġsoftware . amazon . aw ssdk . auth . credentials . Aws Credentials Provider Ċ import Ġsoftware . aws . tool k its . jetbrains . utils . run Under Progress IfNeeded Ċ import Ġsoftware . aws . tool k its . resources . message Ċ Ċ /** Ċ Ġ* ĠOff loads Ġfetching Ġcredentials Ġto Ġa Ġbackground Ġtask Ġand Ġa Ġmodal Ġprogress Ġbar Ġif Ġthe Ġcurrent Ġthread Ġis ĠE DT Ċ Ġ*/ Ċ class ĠCorrect Thread Credentials Provider ( private Ġval Ġdelegate : ĠAws Credentials Provider ) Ġ: ĠAws Credentials Provider Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġresolve Credentials (): ĠAws Credentials Ġ= Ġrun Under Progress IfNeeded ( null , Ġmessage (" credentials . retrie ving "), Ġcancel able Ġ= Ġfalse ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdelegate . resolve Credentials () ĊĠĠĠ Ġ} Ċ } Ċ