Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A simple web page that allows users to communicate with the [Azure Health Bot](h

2.Set the following environment variables:

`END_USER_AUTH_JWT_SECRET`
`AUTH_JWT_SECRET`

`WEBCHAT_SECRET`

Expand Down
10 changes: 5 additions & 5 deletions azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"description": "Location for all resources."
}
},
"endUserAuthJwtSecret": {
"authJwtSecret": {
"type": "securestring",
"metadata":{
"description": "Healthbot end user authentication JWT secret."
Expand Down Expand Up @@ -109,8 +109,8 @@
"alwaysOn": "[variables('alwaysOn')]",
"appSettings": [
{
"name": "END_USER_AUTH_JWT_SECRET",
"value": "[parameters('endUserAuthJwtSecret')]"
"name": "AUTH_JWT_SECRET",
"value": "[parameters('authJwtSecret')]"
},
{
"name": "WEBCHAT_SECRET",
Expand Down Expand Up @@ -170,8 +170,8 @@
"siteConfig": {
"appSettings": [
{
"name": "END_USER_AUTH_JWT_SECRET",
"value": "[parameters('endUserAuthJwtSecret')]"
"name": "AUTH_JWT_SECRET",
"value": "[parameters('authJwtSecret')]"
},
{
"name": "WEBCHAT_SECRET",
Expand Down
Binary file modified secrets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const fetch = require('node-fetch');
const cookieParser = require('cookie-parser');
const WEBCHAT_SECRET = process.env.WEBCHAT_SECRET;
const DIRECTLINE_ENDPOINT_URI = process.env.DIRECTLINE_ENDPOINT_URI;
const END_USER_AUTH_JWT_SECRET = process.env.END_USER_AUTH_JWT_SECRET
const AUTH_JWT_SECRET = process.env.AUTH_JWT_SECRET
const directLineTokenEp = `https://${DIRECTLINE_ENDPOINT_URI || "directline.botframework.com"}/v3/directline/tokens/generate`;

// Initialize the web app instance,
Expand Down Expand Up @@ -111,7 +111,7 @@ app.post('/chatBot', async function(req, res) {
response['isAgent'] = true;
}
response['directLineURI'] = DIRECTLINE_ENDPOINT_URI;
const jwtToken = jwt.sign(response, END_USER_AUTH_JWT_SECRET);
const jwtToken = jwt.sign(response, AUTH_JWT_SECRET);
res.send(jwtToken);
}
catch (err) {
Expand Down