mirror of
https://github.com/vector-im/element-call.git
synced 2026-09-10 21:55:19 +00:00
Give JWT token fetch procedures more appropriate names
This commit is contained in:
@@ -126,9 +126,9 @@ export async function getSFUConfigWithOpenID(
|
|||||||
if (tryBothJwtEndpoints || forceMatrix2Jwt) {
|
if (tryBothJwtEndpoints || forceMatrix2Jwt) {
|
||||||
try {
|
try {
|
||||||
logger?.info(
|
logger?.info(
|
||||||
`Trying to get JWT with delegation for focus ${serviceUrl}...`,
|
`Trying to get JWT via default endpoint for focus ${serviceUrl}...`,
|
||||||
);
|
);
|
||||||
const sfuConfig = await getLiveKitJWTWithDelayDelegation(
|
const sfuConfig = await getLiveKitJWT(
|
||||||
membership,
|
membership,
|
||||||
serviceUrl,
|
serviceUrl,
|
||||||
roomId,
|
roomId,
|
||||||
@@ -154,7 +154,7 @@ export async function getSFUConfigWithOpenID(
|
|||||||
logger?.info(
|
logger?.info(
|
||||||
`Trying to get JWT with legacy endpoint for focus ${serviceUrl}...`,
|
`Trying to get JWT with legacy endpoint for focus ${serviceUrl}...`,
|
||||||
);
|
);
|
||||||
sfuConfig = await getLiveKitJWT(
|
sfuConfig = await getLiveKitJWTLegacy(
|
||||||
membership.deviceId,
|
membership.deviceId,
|
||||||
serviceUrl,
|
serviceUrl,
|
||||||
roomId,
|
roomId,
|
||||||
@@ -188,7 +188,7 @@ function extractFullConfigFromToken(sfuConfig: {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getLiveKitJWT(
|
async function getLiveKitJWTLegacy(
|
||||||
deviceId: string,
|
deviceId: string,
|
||||||
livekitServiceURL: string,
|
livekitServiceURL: string,
|
||||||
matrixRoomId: string,
|
matrixRoomId: string,
|
||||||
@@ -263,7 +263,7 @@ class NotSupportedError extends Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getLiveKitJWTWithDelayDelegation(
|
export async function getLiveKitJWT(
|
||||||
membership: CallMembershipIdentityParts,
|
membership: CallMembershipIdentityParts,
|
||||||
livekitServiceURL: string,
|
livekitServiceURL: string,
|
||||||
matrixRoomId: string,
|
matrixRoomId: string,
|
||||||
|
|||||||
Reference in New Issue
Block a user