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{
|
||||
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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue