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
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/concept-client-protocols.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,17 @@ Here is a general authorization workflow:
29
29
1. The application server returns the JWT and the service URL to the client.
30
30
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.
31
31
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.
0 commit comments