diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/InstitutionalAuthenticationEntryPoint.java b/src/main/java/ch/ethz/seb/sebserver/gui/InstitutionalAuthenticationEntryPoint.java index 493cd21e9..e78541bb8 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/InstitutionalAuthenticationEntryPoint.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/InstitutionalAuthenticationEntryPoint.java @@ -158,6 +158,11 @@ public void commence( .uriVariables(uriVars) .toUriString(); final RestTemplate restTemplate = new RestTemplate(); + final Result clientHttpRequestFactory = this.clientHttpRequestFactoryService + .getClientHttpRequestFactory(); + if (!clientHttpRequestFactory.hasError()) { + restTemplate.setRequestFactory(clientHttpRequestFactory.get()); + } final List institutions = restTemplate .exchange( uriString, diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPITemplateAdapter.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPITemplateAdapter.java index c74558da8..349553958 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPITemplateAdapter.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPITemplateAdapter.java @@ -527,6 +527,7 @@ public Result applyConnectionDetails(final IntegrationData data return this.lmsAccessRequest.protectedRun(() -> this.lmsIntegrationAPI .applyConnectionDetails(data) + .onError(error -> log.error("Failed to apply LMS full integration: ", error)) .getOrThrow()); } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ScreenProctoringAPIBinding.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ScreenProctoringAPIBinding.java index e59811619..4b2d22efe 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ScreenProctoringAPIBinding.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ScreenProctoringAPIBinding.java @@ -1400,6 +1400,7 @@ final static class ScreenProctoringServiceOAuthTemplate { resource.setUsername(userCredentials.clientIdAsString()); resource.setPassword(decryptedSecret.toString()); + // TODO use overall HttpRequestFactory to avoid SSL issues final SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory(); requestFactory.setOutputStreaming(false); final OAuth2RestTemplate oAuth2RestTemplate = new OAuth2RestTemplate(resource); @@ -1412,7 +1413,7 @@ ResponseEntity testServiceConnection() { try { this.restTemplate.getAccessToken(); } catch (final Exception e) { - log.info("Failed to get access token for SEB Screen Proctoring Service: {}", e.getMessage()); + log.error("Failed to get access token for SEB Screen Proctoring Service: ", e); return new ResponseEntity<>(HttpStatus.UNAUTHORIZED); }