Skip to content

Commit 5ed3ee5

Browse files
authored
fix
1 parent 365ca8d commit 5ed3ee5

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

articles/azure-functions/functions-bindings-signalr-service-input.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ zone_pivot_groups: programming-languages-set-functions-lang-workers
1212

1313
# SignalR Service input binding for Azure Functions
1414

15-
Before a client can connect to Azure SignalR Service, it must retrieve the service endpoint URL and a valid access token. The *SignalRConnectionInfo* input binding produces the SignalR Service endpoint URL and a valid token that are used to connect to the service. Because the token is time-limited and can be used to authenticate a specific user to a connection, you should not cache the token or share it between clients. An HTTP trigger using this binding can be used by clients to retrieve the connection information.
16-
17-
For more information on how this binding is used to create a "negotiate" function that can be consumed by a SignalR client SDK, see the [Azure Functions development and configuration article](../azure-signalr/signalr-concept-serverless-development-config.md) in the SignalR Service concepts documentation.
15+
Before a client can connect to Azure SignalR Service, it must retrieve the service endpoint URL and a valid access token. The *SignalRConnectionInfo* input binding produces the SignalR Service endpoint URL and a valid token that are used to connect to the service. The token is time-limited and can be used to authenticate a specific user to a connection. Therefore, you shouldn't cache the token or share it between clients. Usually you use *SignalRConnectionInfo* with HTTP trigger for clients to retrieve the connection information.
1816

17+
For more information on how to use this binding to create a "negotiate" function that is compatible with a SignalR client SDK, see [Azure Functions development and configuration with Azure SignalR Service](../azure-signalr/signalr-concept-serverless-development-config.md).
1918
For information on setup and configuration details, see the [overview](functions-bindings-signalr-service.md).
2019

2120
## Example
@@ -150,7 +149,7 @@ public SignalRConnectionInfo negotiate(
150149

151150
### Authenticated tokens
152151

153-
When the function is triggered by an authenticated client, you can add a user ID claim to the generated token. You can easily add authentication to a function app using [App Service Authentication](../app-service/overview-authentication-authorization.md).
152+
When an authenticated client triggers the function, you can add a user ID claim to the generated token. You can easily add authentication to a function app using [App Service Authentication](../app-service/overview-authentication-authorization.md).
154153

155154
App Service authentication sets HTTP headers named `x-ms-client-principal-id` and `x-ms-client-principal-name` that contain the authenticated user's client principal ID and name, respectively.
156155

@@ -320,9 +319,9 @@ The following table explains the properties of the `SignalRConnectionInfo` attri
320319
|---------|----------------------|
321320
|**hubName**| Required. The hub name. |
322321
|**ConnectionStringSetting**| The name of the app setting that contains the SignalR Service connection string, which defaults to `AzureSignalRConnectionString`. |
323-
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
324-
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
325-
|**ClaimTypeList**| Optional. A list of claim types which filter the claims in **IdToken** . |
322+
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
323+
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
324+
|**ClaimTypeList**| Optional. A list of claim types, which filter the claims in **IdToken** . |
326325

327326
# [Isolated process](#tab/isolated-process)
328327

@@ -332,9 +331,9 @@ The following table explains the properties of the `SignalRConnectionInfoInput`
332331
|---------|----------------------|
333332
|**hubName**| Required. The hub name. |
334333
|**ConnectionStringSetting**| The name of the app setting that contains the SignalR Service connection string, which defaults to `AzureSignalRConnectionString`. |
335-
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
336-
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
337-
|**ClaimTypeList**| Optional. A list of claim types which filter the claims in **IdToken** . |
334+
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
335+
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
336+
|**ClaimTypeList**| Optional. A list of claim types, which filter the claims in **IdToken** . |
338337

339338
# [C# Script](#tab/csharp-script)
340339

@@ -347,9 +346,9 @@ The following table explains the binding configuration properties that you set i
347346
|**name**| Variable name used in function code for connection info object. |
348347
|**hubName**| Required. The hub name. |
349348
|**ConnectionStringSetting**| The name of the app setting that contains the SignalR Service connection string, which defaults to `AzureSignalRConnectionString`. |
350-
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
351-
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
352-
|**ClaimTypeList**| Optional. A list of claim types which filter the claims in **IdToken** . |
349+
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
350+
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
351+
|**ClaimTypeList**| Optional. A list of claim types, which filter the claims in **IdToken** . |
353352

354353
---
355354

@@ -366,9 +365,9 @@ The following table explains the supported settings for the `SignalRConnectionIn
366365
|**name**| Variable name used in function code for connection info object. |
367366
|**hubName**| Required. The hub name. |
368367
|**ConnectionStringSetting**| The name of the app setting that contains the SignalR Service connection string, which defaults to `AzureSignalRConnectionString`. |
369-
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
370-
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
371-
|**ClaimTypeList**| Optional. A list of claim types which filter the claims in **IdToken** . |
368+
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
369+
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
370+
|**ClaimTypeList**| Optional. A list of claim types, which filter the claims in **IdToken** . |
372371

373372
::: zone-end
374373
::: zone pivot="programming-language-javascript,programming-language-powershell,programming-language-python"
@@ -382,15 +381,15 @@ The following table explains the binding configuration properties that you set i
382381
|**direction**| Must be set to `in`.|
383382
|**hubName**| Required. The hub name. |
384383
|**ConnectionStringSetting**| The name of the app setting that contains the SignalR Service connection string, which defaults to `AzureSignalRConnectionString`. |
385-
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
386-
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to a HTTP request header or query. |
387-
|**ClaimTypeList**| Optional. A list of claim types which filter the claims in **IdToken** . |
384+
|**UserId**| Optional. The user identifier of a SignalR connection. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
385+
|**IdToken**| Optional. A JWT token whose claims will be added to the user claims. It should be used together with **ClaimTypeList**. You can use a [binding expression](#binding-expressions-for-http-trigger) to bind the value to an HTTP request header or query. |
386+
|**ClaimTypeList**| Optional. A list of claim types, which filter the claims in **IdToken** . |
388387

389388
::: zone-end
390389

391390
### Binding expressions for HTTP trigger
392391
<a name="binding-expressions-for-http-trigger"></a>
393-
As SignalR input binding is usually used together with HTTP trigger, and the values of some attributes of SignalR input binding usually come from HTTP requests, we'll show how to bind values from HTTP requests to SignalR input binding attributes via [binding expression](./functions-bindings-expressions-patterns.md#trigger-metadata).
392+
It's a common scenario that the values of some attributes of SignalR input binding come from HTTP requests. Therefore, we show how to bind values from HTTP requests to SignalR input binding attributes via [binding expression](./functions-bindings-expressions-patterns.md#trigger-metadata).
394393

395394
| HTTP metadata type | Binding expression format | Description | Example |
396395
|---------|--------|---------|--------|

0 commit comments

Comments
 (0)