fix(core.gbapp): #387 adding /setupSecurity multiple tokens. Refresh token fix. @othonlima.

This commit is contained in:
Rodrigo Rodriguez 2023-12-25 18:42:23 -03:00
parent c6076c32ef
commit 255a10bdc3
2 changed files with 5 additions and 4 deletions

View file

@ -620,6 +620,7 @@ export class GBVMService extends GBService {
};
try{
await ensureTokens();
${code}
}
catch(e){
@ -954,8 +955,8 @@ export class GBVMService extends GBService {
try {
let {token, expiresOn} = await sys.getCustomToken({pid, tokenName});
variables[token] = token;
variables[token + '_expiresOn'] = expiresOn;
variables[tokenName] = token;
variables[tokenName + '_expiresOn'] = expiresOn;
} catch (error) {

View file

@ -1670,10 +1670,10 @@ export class SystemKeywords {
return res;
}
public async getCustomToken({ pid, token: tokenName }) {
public async getCustomToken({ pid, tokenName }) {
const { min } = await DialogKeywords.getProcessInfo(pid);
GBLogEx.info(min, `GET TOKEN: ${tokenName}`);
GBLogEx.info(min, `BASIC internal getCustomToken: ${tokenName}`);
const token = await (min.adminService as any)['acquireElevatedToken']
(min.instance.instanceId, false,