mirror of
https://github.com/vector-im/element-call.git
synced 2026-09-07 21:45:18 +00:00
16 lines
259 B
TypeScript
16 lines
259 B
TypeScript
export function createJTWToken(sub: string, room: string) {
|
|
return [
|
|
{}, // header
|
|
{
|
|
// payload
|
|
sub,
|
|
video: {
|
|
room,
|
|
},
|
|
},
|
|
{}, // signature
|
|
]
|
|
.map((d) => global.btoa(JSON.stringify(d)))
|
|
.join(".");
|
|
}
|