Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(tests): Adds an option for an access jwt token.
damencho00efcfaae5f0
diff --git a/tests/env.example b/tests/env.exampleindex 6b06cfaef4..cc0d472bbf 100644--- a/tests/env.example+++ b/tests/env.example@@ -26,6 +26,9 @@# The kid to use in the token#JWT_KID=+# An access token to use to create meetings (used for the first participant)+#JWT_ACCESS_TOKEN=+# The count of workers that execute the tests in parallel# MAX_INSTANCES=1diff --git a/tests/helpers/participants.ts b/tests/helpers/participants.tsindex 073399d337..80e0dc3358 100644--- a/tests/helpers/participants.ts+++ b/tests/helpers/participants.ts@@ -165,9 +165,14 @@ async function joinTheModeratorAsP1(ctx: IContext, options?: IJoinOptions) {const p1DisplayName = P1_DISPLAY_NAME;let token;- // if it is jaas create the first one to be moderator and second not moderator- if (ctx.jwtPrivateKeyPath && !options?.skipFirstModerator) {- token = getModeratorToken(p1DisplayName);+ if (!options?.skipFirstModerator) {+ // we prioritize the access token when iframe is not used and private key is set,+ // otherwise if private key is not specified we use the access token if set+ if (process.env.JWT_ACCESS_TOKEN && (!ctx.jwtPrivateKeyPath || !ctx.iframeAPI)) {+ token = process.env.JWT_ACCESS_TOKEN;+ } else if (ctx.jwtPrivateKeyPath) {+ token = getModeratorToken(p1DisplayName);+ }}// make sure the first participant is moderator, if supported by deployment