Skip to content

Commit 1387154

Browse files
authored
Update the doc
1 parent a939597 commit 1387154

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

articles/azure-web-pubsub/concept-client-protocols.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ Here is a general authorization workflow:
2929
1. The application server returns the JWT and the service URL to the client.
3030
1. The client tries to connect to the Web PubSub service by using the URL and the JWT that's returned from the application server.
3131

32+
You could also configure additional properties for the client connection when generating the access token by specifying special claims inside the JWT token:
33+
34+
| Property | Claim type | Claim value | Notes |
35+
| --- | ---| --- |
36+
| The `userId` that the client connection belongs to | `sub` | `{userId}`` | It is the [user](./key-concepts.md#terms) this connection belongs to. You could use `SendToUser` to send messages to the connections belonging to this user |
37+
| The lifetime of the token | `exp` | the expiration time of the token | |
38+
| The [permissions](#permissions) the client connection initially has | `role` | List of roles as listed in [permissions](#permissions) | |
39+
| The initial groups that the client connection joins once it connects to Azure Web PubSub | `group` | List of groups the client joins initially | |
40+
41+
[Server SDKs](./howto-generate-client-access-url.md#generate-from-service-sdk) provides APIs to generate the access token for the clients.
42+
3243
<a name="simple_client"></a>
3344

3445
## The simple WebSocket client

0 commit comments

Comments
 (0)