mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-02 19:49:23 +00:00
initial attmept to use the matrix 2.0 json schema towards the jwt service
This commit is contained in:
@@ -19,7 +19,7 @@ export interface SFUConfig {
|
|||||||
// The bits we need from MatrixClient
|
// The bits we need from MatrixClient
|
||||||
export type OpenIDClientParts = Pick<
|
export type OpenIDClientParts = Pick<
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
"getOpenIdToken" | "getDeviceId"
|
"getOpenIdToken" | "getDeviceId" | "baseUrl" | "getUserId"
|
||||||
>;
|
>;
|
||||||
/**
|
/**
|
||||||
* Gets a bearer token from the homeserver and then use it to authenticate
|
* Gets a bearer token from the homeserver and then use it to authenticate
|
||||||
@@ -73,9 +73,17 @@ async function getLiveKitJWT(
|
|||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
room: roomName,
|
room_id: roomName,
|
||||||
|
slot_id: "m.call#ROOM",
|
||||||
openid_token: openIDToken,
|
openid_token: openIDToken,
|
||||||
device_id: client.getDeviceId(),
|
member: {
|
||||||
|
id: (client.getUserId() ?? "") + client.getDeviceId(),
|
||||||
|
claimed_user_id: client.getUserId(),
|
||||||
|
claimed_device_id: client.getDeviceId(),
|
||||||
|
},
|
||||||
|
delay_id: "12345",
|
||||||
|
delay_timeout: 10000,
|
||||||
|
delay_cs_api_url: client.baseUrl
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user