You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func new --template "HTTP trigger" --name negotiate
135
+
```
159
136
160
-
The function contains an HTTP trigger binding to receive requests from SignalR clients. The function also contains a SignalR input binding to generate valid credentials for a client to connect to an Azure SignalR Service hub named `default`.
137
+
1. Open _src/functions/negotiate.js_, update the content as follows:
161
138
162
-
This function takes the SignalR connection information from the input binding and returns it to the client in the HTTP response body..
There's no `userId` property in the `signalRConnectionInfo` binding for local development. You'll add it later to set the username of a SignalR connection when you deploy the function app to Azure.
160
+
The functioncontains an HTTP trigger binding to receive requests from SignalR clients. The functionalso contains a SignalR input binding to generate valid credentials for a client to connect to an Azure SignalR Service hub named `default`.
165
161
166
-
# [Model v3](#tab/nodejs-v3)
162
+
This functiontakes the SignalR connection information from the input binding and returns it to the client in the HTTP response body..
167
163
168
-
1. Open _negotiate/function.json_ to view the function binding configuration.
164
+
There's no `userId` property in the `signalRConnectionInfo` binding for local development. You'll add it later to set the username of a SignalR connection when you deploy the functionapp to Azure.
169
165
170
-
The function contains an HTTP trigger binding to receive requests from SignalR clients. The function also contains a SignalR input binding to generate valid credentials for a client to connect to an Azure SignalR Service hub named `default`.
1. Open _negotiate/function.json_ to view the functionbinding configuration.
169
+
170
+
The functioncontains an HTTP trigger binding to receive requests from SignalR clients. The functionalso contains a SignalR input binding to generate valid credentials for a client to connect to an Azure SignalR Service hub named `default`.
There's no `userId` property in the `signalRConnectionInfo` binding for local development. You'll add it later to set the username of a SignalR connection when you deploy the function app to Azure.
200
+
There's no `userId` property in the `signalRConnectionInfo` binding for local development. You'll add it later to set the username of a SignalR connection when you deploy the functionapp to Azure.
201
201
202
-
1. Close the _negotiate/function.json_ file.
202
+
1. Close the _negotiate/function.json_ file.
203
203
204
-
1. Open _negotiate/index.js_ to view the body of the function:
204
+
1. Open _negotiate/index.js_ to view the body of the function:
205
205
206
-
```javascript
207
-
module.exports = async function (context, req, connectionInfo) {
This function takes the SignalR connection information from the input binding and returns it to the client in the HTTP response body. The SignalR client uses this information to connect to the Azure SignalR Service instance.
212
+
This functiontakes the SignalR connection information from the input binding and returns it to the client in the HTTP response body. The SignalR client uses this information to connect to the Azure SignalR Service instance.
213
213
214
214
[Having issues? Let us know.](https://aka.ms/asrs/qsauth)
0 commit comments