Skip to content

Commit 842e0eb

Browse files
authored
added token type to the tracking example in theolive (#450)
This is for unifcation between Millicast and THEOlive so that users don't get confused when trying to use both systems together.
1 parent 435574e commit 842e0eb

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

theolive/platform/viewer-tracking.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,18 @@ To put it all together, here is an example `payload` for a JWT that includes sam
3636
"tracking": {
3737
"trackingId": "groupAbc"
3838
},
39-
"customViewerData": "user=user123;appVersion=x.y.x"
39+
"customViewerData": "user=user123;appVersion=x.y.x",
40+
"tokenType": "Subscribe"
4041
},
4142
"iat": 1750813271,
4243
"exp": 1750813871 // required for the token to be valid
4344
}
4445
```
4546

46-
Here is the JWT that is used to generate this token, you can paste it into [jwt.io](https://jwt.io/#token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdHJlYW1pbmciOnsidHJhY2tpbmciOnsidHJhY2tpbmdJZCI6Imdyb3VwQWJjIn0sImN1c3RvbVZpZXdlckRhdGEiOiJ1c2VyPXVzZXIxMjM7YXBwVmVyc2lvbj14LnkueCJ9LCJpYXQiOjE3NTA4MTMyNzEsImV4cCI6MTc1MDgxMzg3MX0.KFBOVmRq7i0W829mu0Og06NrQg_lAWRAOFLCLmuNSJY).
47+
Here is the JWT that is used to generate this token, you can paste it into [jwt.io](https://jwt.io/#token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdHJlYW1pbmciOnsidHJhY2tpbmciOnsidHJhY2tpbmdJZCI6Imdyb3VwQWJjIn0sImN1c3RvbVZpZXdlckRhdGEiOiJ1c2VyPXVzZXIxMjM7YXBwVmVyc2lvbj14LnkueCIsInRva2VuVHlwZSI6IlN1YnNjcmliZSJ9LCJpYXQiOjE3NTA4MTMyNzEsImV4cCI6MTc1MDgxMzg3MX0.OvIZAvs6XL4KQ8YTtIdjdJNZ5oS6Jkosj3mq274gdrw).
4748

4849
```text
49-
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdHJlYW1pbmciOnsidHJhY2tpbmciOnsidHJhY2tpbmdJZCI6Imdyb3VwQWJjIn0sImN1c3RvbVZpZXdlckRhdGEiOiJ1c2VyPXVzZXIxMjM7YXBwVmVyc2lvbj14LnkueCJ9LCJpYXQiOjE3NTA4MTMyNzEsImV4cCI6MTc1MDgxMzg3MX0.KFBOVmRq7i0W829mu0Og06NrQg_lAWRAOFLCLmuNSJY
50+
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdHJlYW1pbmciOnsidHJhY2tpbmciOnsidHJhY2tpbmdJZCI6Imdyb3VwQWJjIn0sImN1c3RvbVZpZXdlckRhdGEiOiJ1c2VyPXVzZXIxMjM7YXBwVmVyc2lvbj14LnkueCIsInRva2VuVHlwZSI6IlN1YnNjcmliZSJ9LCJpYXQiOjE3NTA4MTMyNzEsImV4cCI6MTc1MDgxMzg3MX0.OvIZAvs6XL4KQ8YTtIdjdJNZ5oS6Jkosj3mq274gdrw
5051
```
5152

5253
To see the validation tool validate the token, insert the random secret used to sign the token: `d2e166fdda89824a6c493d8a2af7a0754199eff9e38c579cba8783767a44039c`.
@@ -55,3 +56,4 @@ To see the validation tool validate the token, insert the random secret used to
5556

5657
- Tracking can be used independently of secure channels. You can pass the same payload parameters in a JWT, however, we require that the token is "valid". This means that the required date fields _must_ be valid or the token will be ignored. If a channel does not have token security enabled, however, be aware that anyone can view the channel with or without a jwt token. If secure channels are not enabled, the signature is not validated, so there is a risk that a user _could_ change the values
5758
- If you are combining our OptiView real-time (Millicast) streaming solution and our live streaming solution (THEOlive), you may use the _secret_ from the Millicast subscriber token as the secret you provide to THEOlive and you can use the same JWTs across both streaming products
59+
- `tokenType` should be set to `Subscribe`

0 commit comments

Comments
 (0)