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",
 | 
			
		||||
  "version": "1.7.3",
 | 
			
		||||
  "version": "1.7.5",
 | 
			
		||||
  "lockfileVersion": 1,
 | 
			
		||||
  "requires": true,
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -406,16 +406,17 @@ export class AzureDeployerService implements IGBInstallationDeployer {
 | 
			
		|||
 | 
			
		||||
    instance.textAnalyticsEndpoint = textAnalytics.endpoint.replace(`/text/analytics/v2.0`, '');
 | 
			
		||||
    instance.textAnalyticsKey = keys.key1;
 | 
			
		||||
    if (false) {
 | 
			
		||||
 | 
			
		||||
    GBLog.info(`Deploying NLP...`);
 | 
			
		||||
    const nlp = await this.createNLP(name, `${name}-nlp`, instance.cloudLocation);
 | 
			
		||||
    keys = await this.cognitiveClient.accounts.listKeys(name, nlp.name);
 | 
			
		||||
    const nlpAppId = await this.createNLPService(name, name, instance.cloudLocation, culture, instance.nlpAuthoringKey);
 | 
			
		||||
 | 
			
		||||
    instance.nlpEndpoint = nlp.endpoint; // TODO: Add this final URL /apps/a149dae1-5134-4624-96b5-885e9e674c9e
 | 
			
		||||
    instance.nlpKey = keys.key1;
 | 
			
		||||
    instance.nlpAppId = nlpAppId;
 | 
			
		||||
      GBLog.info(`Deploying NLP...`);
 | 
			
		||||
      const nlp = await this.createNLP(name, `${name}-nlp`, instance.cloudLocation);
 | 
			
		||||
      keys = await this.cognitiveClient.accounts.listKeys(name, nlp.name);
 | 
			
		||||
      const nlpAppId = await this.createNLPService(name, name, instance.cloudLocation, culture, instance.nlpAuthoringKey);
 | 
			
		||||
 | 
			
		||||
      instance.nlpEndpoint = nlp.endpoint; // TODO: Add this final URL /apps/a149dae1-5134-4624-96b5-885e9e674c9e
 | 
			
		||||
      instance.nlpKey = keys.key1;
 | 
			
		||||
      instance.nlpAppId = nlpAppId;
 | 
			
		||||
    }
 | 
			
		||||
    GBLog.info(`Deploying Bot...`);
 | 
			
		||||
    instance.botEndpoint = this.defaultEndPoint;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -373,7 +373,7 @@ export class GBDeployer {
 | 
			
		|||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public runOnce() {
 | 
			
		||||
  public setupDefaultGBUI() {
 | 
			
		||||
    const root = 'packages/default.gbui';
 | 
			
		||||
    const npm = urlJoin(process.env.PWD, 'node_modules', '.bin', 'npm');
 | 
			
		||||
    if (!Fs.existsSync(`${root}/build`)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -348,7 +348,7 @@ export class GBMinService {
 | 
			
		|||
  private async getSTSToken(instance: any) {
 | 
			
		||||
 | 
			
		||||
    const options = {
 | 
			
		||||
      url: 'https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken',
 | 
			
		||||
      url: instance.speechEndpoint,
 | 
			
		||||
      method: 'POST',
 | 
			
		||||
      headers: {
 | 
			
		||||
        'Ocp-Apim-Subscription-Key': instance.speechKey
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -176,7 +176,7 @@ export class GBServer {
 | 
			
		|||
 | 
			
		||||
          // Deployment of local applications for the first time.
 | 
			
		||||
 | 
			
		||||
          deployer.runOnce();
 | 
			
		||||
          deployer.setupDefaultGBUI();
 | 
			
		||||
 | 
			
		||||
          GBLog.info(`The Bot Server is in RUNNING mode...`);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue