fix(core.gbapp): #387 adding /setupSecurity multiple tokens. Refresh token fix. @othonlima.
This commit is contained in:
parent
c6076c32ef
commit
255a10bdc3
2 changed files with 5 additions and 4 deletions
|
@ -620,6 +620,7 @@ export class GBVMService extends GBService {
|
||||||
};
|
};
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
await ensureTokens();
|
||||||
${code}
|
${code}
|
||||||
}
|
}
|
||||||
catch(e){
|
catch(e){
|
||||||
|
@ -954,8 +955,8 @@ export class GBVMService extends GBService {
|
||||||
try {
|
try {
|
||||||
let {token, expiresOn} = await sys.getCustomToken({pid, tokenName});
|
let {token, expiresOn} = await sys.getCustomToken({pid, tokenName});
|
||||||
|
|
||||||
variables[token] = token;
|
variables[tokenName] = token;
|
||||||
variables[token + '_expiresOn'] = expiresOn;
|
variables[tokenName + '_expiresOn'] = expiresOn;
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -1670,10 +1670,10 @@ export class SystemKeywords {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getCustomToken({ pid, token: tokenName }) {
|
public async getCustomToken({ pid, tokenName }) {
|
||||||
|
|
||||||
const { min } = await DialogKeywords.getProcessInfo(pid);
|
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']
|
const token = await (min.adminService as any)['acquireElevatedToken']
|
||||||
(min.instance.instanceId, false,
|
(min.instance.instanceId, false,
|
||||||
|
|
Loading…
Add table
Reference in a new issue