diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs index cf4a2f38..a55f36d6 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs @@ -92,12 +92,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping case Keys.Proctoring.Zoom.AllowRaiseHand: MapZoomAllowRaiseHands(settings, value); break; - case Keys.Proctoring.Zoom.ApiKey: - MapZoomApiKey(settings, value); - break; - case Keys.Proctoring.Zoom.ApiSecret: - MapZoomApiSecret(settings, value); - break; case Keys.Proctoring.Zoom.AudioMuted: MapZoomAudioMuted(settings, value); break; @@ -353,22 +347,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping } } - private void MapZoomApiKey(AppSettings settings, object value) - { - if (value is string key) - { - settings.Proctoring.Zoom.ApiKey = key; - } - } - - private void MapZoomApiSecret(AppSettings settings, object value) - { - if (value is string secret) - { - settings.Proctoring.Zoom.ApiSecret = secret; - } - } - private void MapZoomAudioMuted(AppSettings settings, object value) { if (value is bool muted) diff --git a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs index e14897dc..a6cd5795 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs @@ -258,8 +258,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal const string AllowChat = "zoomFeatureFlagChat"; internal const string AllowClosedCaptions = "zoomFeatureFlagCloseCaptions"; internal const string AllowRaiseHand = "zoomFeatureFlagRaiseHand"; - internal const string ApiKey = "zoomApiKey"; - internal const string ApiSecret = "zoomApiSecret"; internal const string AudioMuted = "zoomAudioMuted"; internal const string Enabled = "zoomEnable"; internal const string MeetingNumber = "zoomRoom"; diff --git a/SafeExamBrowser.Proctoring/ProctoringControl.cs b/SafeExamBrowser.Proctoring/ProctoringControl.cs index 2d04669c..568cd95f 100644 --- a/SafeExamBrowser.Proctoring/ProctoringControl.cs +++ b/SafeExamBrowser.Proctoring/ProctoringControl.cs @@ -96,10 +96,9 @@ namespace SafeExamBrowser.Proctoring } else if (settings.Zoom.Enabled) { - credentials.Add(new JProperty("apiKey", settings.Zoom.ApiKey)); - credentials.Add(new JProperty("apiSecret", settings.Zoom.ApiSecret)); credentials.Add(new JProperty("meetingNumber", settings.Zoom.MeetingNumber)); credentials.Add(new JProperty("password", settings.Zoom.Password)); + credentials.Add(new JProperty("sdkKey", settings.Zoom.SdkKey)); credentials.Add(new JProperty("signature", settings.Zoom.Signature)); credentials.Add(new JProperty("userName", settings.Zoom.UserName)); } diff --git a/SafeExamBrowser.Proctoring/ProctoringController.cs b/SafeExamBrowser.Proctoring/ProctoringController.cs index e6313ead..7c1e936b 100644 --- a/SafeExamBrowser.Proctoring/ProctoringController.cs +++ b/SafeExamBrowser.Proctoring/ProctoringController.cs @@ -103,8 +103,7 @@ namespace SafeExamBrowser.Proctoring } else if (settings.Zoom.Enabled) { - start = !string.IsNullOrWhiteSpace(settings.Zoom.ApiKey); - start &= !string.IsNullOrWhiteSpace(settings.Zoom.ApiSecret) || !string.IsNullOrWhiteSpace(settings.Zoom.Signature); + start = !string.IsNullOrWhiteSpace(settings.Zoom.SdkKey) && !string.IsNullOrWhiteSpace(settings.Zoom.Signature); start &= !string.IsNullOrWhiteSpace(settings.Zoom.MeetingNumber); start &= !string.IsNullOrWhiteSpace(settings.Zoom.UserName); } @@ -168,9 +167,9 @@ namespace SafeExamBrowser.Proctoring settings.JitsiMeet.ServerUrl = args.JitsiMeetServerUrl; settings.JitsiMeet.Token = args.JitsiMeetToken; - settings.Zoom.ApiKey = args.ZoomApiKey; settings.Zoom.MeetingNumber = args.ZoomMeetingNumber; settings.Zoom.Password = args.ZoomPassword; + settings.Zoom.SdkKey = args.ZoomSdkKey; settings.Zoom.Signature = args.ZoomSignature; settings.Zoom.Subject = args.ZoomSubject; settings.Zoom.UserName = args.ZoomUserName; @@ -272,8 +271,8 @@ namespace SafeExamBrowser.Proctoring Thread.Sleep(2000); window.Close(); - control = default(ProctoringControl); - window = default(IProctoringWindow); + control = default; + window = default; fileSystem.Delete(filePath); logger.Info("Stopped proctoring."); diff --git a/SafeExamBrowser.Proctoring/Zoom/index.html b/SafeExamBrowser.Proctoring/Zoom/index.html index 515aef40..85f7169d 100644 --- a/SafeExamBrowser.Proctoring/Zoom/index.html +++ b/SafeExamBrowser.Proctoring/Zoom/index.html @@ -1,167 +1,148 @@  - - - - - - - - - - - - - - + + + + + + - + window.addEventListener('unload', () => ZoomMtg.leaveMeeting({})); + window.chrome.webview.addEventListener('message', webMessageReceived); + window.chrome.webview.postMessage('credentials'); + + \ No newline at end of file diff --git a/SafeExamBrowser.Server.Contracts/Events/ProctoringInstructionEventArgs.cs b/SafeExamBrowser.Server.Contracts/Events/ProctoringInstructionEventArgs.cs index 2cbfd313..bae66b4b 100644 --- a/SafeExamBrowser.Server.Contracts/Events/ProctoringInstructionEventArgs.cs +++ b/SafeExamBrowser.Server.Contracts/Events/ProctoringInstructionEventArgs.cs @@ -16,9 +16,9 @@ namespace SafeExamBrowser.Server.Contracts.Events public string JitsiMeetRoomName { get; set; } public string JitsiMeetServerUrl { get; set; } public string JitsiMeetToken { get; set; } - public string ZoomApiKey { get; set; } public string ZoomMeetingNumber { get; set; } public string ZoomPassword { get; set; } + public string ZoomSdkKey { get; set; } public string ZoomSignature { get; set; } public string ZoomSubject { get; set; } public string ZoomUserName { get; set; } diff --git a/SafeExamBrowser.Server/Parser.cs b/SafeExamBrowser.Server/Parser.cs index 3ed53020..3c6d7cfd 100644 --- a/SafeExamBrowser.Server/Parser.cs +++ b/SafeExamBrowser.Server/Parser.cs @@ -298,9 +298,9 @@ namespace SafeExamBrowser.Server attributes.Instruction.JitsiMeetToken = attributesJson["jitsiMeetToken"].Value(); break; case "ZOOM": - attributes.Instruction.ZoomApiKey = attributesJson["zoomAPIKey"].Value(); attributes.Instruction.ZoomMeetingNumber = attributesJson["zoomRoom"].Value(); attributes.Instruction.ZoomPassword = attributesJson["zoomMeetingKey"].Value(); + attributes.Instruction.ZoomSdkKey = attributesJson["zoomAPIKey"].Value(); attributes.Instruction.ZoomSignature = attributesJson["zoomToken"].Value(); attributes.Instruction.ZoomSubject = attributesJson["zoomSubject"].Value(); attributes.Instruction.ZoomUserName = attributesJson["zoomUserName"].Value(); diff --git a/SafeExamBrowser.Settings/Proctoring/ZoomSettings.cs b/SafeExamBrowser.Settings/Proctoring/ZoomSettings.cs index bec6c3d3..fca61ea5 100644 --- a/SafeExamBrowser.Settings/Proctoring/ZoomSettings.cs +++ b/SafeExamBrowser.Settings/Proctoring/ZoomSettings.cs @@ -31,16 +31,6 @@ namespace SafeExamBrowser.Settings.Proctoring /// public bool AllowRaiseHand { get; set; } - /// - /// The API key to be used for authentication. - /// - public string ApiKey { get; set; } - - /// - /// The API secret to be used for authentication. - /// - public string ApiSecret { get; set; } - /// /// Determines whether the audio starts muted. /// @@ -71,6 +61,11 @@ namespace SafeExamBrowser.Settings.Proctoring /// public bool ReceiveVideo { get; set; } + /// + /// The SDK key to be used for authentication. + /// + public string SdkKey { get; set; } + /// /// Determines whether the audio stream of the user will be sent to the server. ///