fix(core.gbapp): fix of sts token generation
This commit is contained in:
parent
9235f6cc74
commit
d6aa65d840
5 changed files with 13 additions and 12 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "botserver",
|
"name": "botserver",
|
||||||
"version": "1.7.3",
|
"version": "1.7.5",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -406,6 +406,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
|
|
||||||
instance.textAnalyticsEndpoint = textAnalytics.endpoint.replace(`/text/analytics/v2.0`, '');
|
instance.textAnalyticsEndpoint = textAnalytics.endpoint.replace(`/text/analytics/v2.0`, '');
|
||||||
instance.textAnalyticsKey = keys.key1;
|
instance.textAnalyticsKey = keys.key1;
|
||||||
|
if (false) {
|
||||||
|
|
||||||
GBLog.info(`Deploying NLP...`);
|
GBLog.info(`Deploying NLP...`);
|
||||||
const nlp = await this.createNLP(name, `${name}-nlp`, instance.cloudLocation);
|
const nlp = await this.createNLP(name, `${name}-nlp`, instance.cloudLocation);
|
||||||
|
@ -415,7 +416,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
instance.nlpEndpoint = nlp.endpoint; // TODO: Add this final URL /apps/a149dae1-5134-4624-96b5-885e9e674c9e
|
instance.nlpEndpoint = nlp.endpoint; // TODO: Add this final URL /apps/a149dae1-5134-4624-96b5-885e9e674c9e
|
||||||
instance.nlpKey = keys.key1;
|
instance.nlpKey = keys.key1;
|
||||||
instance.nlpAppId = nlpAppId;
|
instance.nlpAppId = nlpAppId;
|
||||||
|
}
|
||||||
GBLog.info(`Deploying Bot...`);
|
GBLog.info(`Deploying Bot...`);
|
||||||
instance.botEndpoint = this.defaultEndPoint;
|
instance.botEndpoint = this.defaultEndPoint;
|
||||||
|
|
||||||
|
|
|
@ -373,7 +373,7 @@ export class GBDeployer {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public runOnce() {
|
public setupDefaultGBUI() {
|
||||||
const root = 'packages/default.gbui';
|
const root = 'packages/default.gbui';
|
||||||
const npm = urlJoin(process.env.PWD, 'node_modules', '.bin', 'npm');
|
const npm = urlJoin(process.env.PWD, 'node_modules', '.bin', 'npm');
|
||||||
if (!Fs.existsSync(`${root}/build`)) {
|
if (!Fs.existsSync(`${root}/build`)) {
|
||||||
|
|
|
@ -348,7 +348,7 @@ export class GBMinService {
|
||||||
private async getSTSToken(instance: any) {
|
private async getSTSToken(instance: any) {
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
url: 'https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken',
|
url: instance.speechEndpoint,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Ocp-Apim-Subscription-Key': instance.speechKey
|
'Ocp-Apim-Subscription-Key': instance.speechKey
|
||||||
|
|
|
@ -176,7 +176,7 @@ export class GBServer {
|
||||||
|
|
||||||
// Deployment of local applications for the first time.
|
// Deployment of local applications for the first time.
|
||||||
|
|
||||||
deployer.runOnce();
|
deployer.setupDefaultGBUI();
|
||||||
|
|
||||||
GBLog.info(`The Bot Server is in RUNNING mode...`);
|
GBLog.info(`The Bot Server is in RUNNING mode...`);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue