fix(core.gbapp): #387 adding /setupSecurity multiple tokens. Refresh token fix. @othonlima @christopherdecastilho.
This commit is contained in:
parent
03586868ec
commit
c855934fdf
2 changed files with 10 additions and 5 deletions
|
@ -543,8 +543,8 @@ export class GBVMService extends GBService {
|
||||||
|
|
||||||
// Transfers auto variables into global object.
|
// Transfers auto variables into global object.
|
||||||
|
|
||||||
for(i in this.variables) {
|
for(__indexer in this.variables) {
|
||||||
global[i] = this.variables[i];
|
global[__indexer] = this.variables[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -605,8 +605,8 @@ export class GBVMService extends GBService {
|
||||||
const ensureTokens = async (firstTime) => {
|
const ensureTokens = async (firstTime) => {
|
||||||
const tokens = this.tokens ? this.tokens.split(',') : [];
|
const tokens = this.tokens ? this.tokens.split(',') : [];
|
||||||
|
|
||||||
for(tokenIndexer in tokens) {
|
for(__indexer in tokens) {
|
||||||
const tokenName = tokens[tokenIndexer];
|
const tokenName = tokens[__indexer];
|
||||||
|
|
||||||
// Auto update Bearar authentication for the first token.
|
// Auto update Bearar authentication for the first token.
|
||||||
|
|
||||||
|
@ -623,7 +623,7 @@ export class GBVMService extends GBService {
|
||||||
global[tokenName + "_expiresOn"]= expiresOn;
|
global[tokenName + "_expiresOn"]= expiresOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tokenIndexer == 0) {
|
if (__indexer == 0) {
|
||||||
headers['Authorization'] = 'Bearer ' + global[tokenName];
|
headers['Authorization'] = 'Bearer ' + global[tokenName];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2409,6 +2409,11 @@ export class SystemKeywords {
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Publishs a tweet to X.
|
||||||
|
*
|
||||||
|
* TWEET "My tweet text"
|
||||||
|
*/
|
||||||
public async tweet({ pid, text }) {
|
public async tweet({ pid, text }) {
|
||||||
const { min, user } = await DialogKeywords.getProcessInfo(pid);
|
const { min, user } = await DialogKeywords.getProcessInfo(pid);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue