Skip to content

Commit

Permalink
Merge branch 'dev-2.0' into development
Browse files Browse the repository at this point in the history
# Conflicts:
#	pom.xml
  • Loading branch information
anhefti committed Oct 31, 2024
2 parents cb4d55b + 3914f79 commit 07eb238
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ public void commence(
.uriVariables(uriVars)
.toUriString();
final RestTemplate restTemplate = new RestTemplate();
final Result<ClientHttpRequestFactory> clientHttpRequestFactory = this.clientHttpRequestFactoryService
.getClientHttpRequestFactory();
if (!clientHttpRequestFactory.hasError()) {
restTemplate.setRequestFactory(clientHttpRequestFactory.get());
}
final List<EntityName> institutions = restTemplate
.exchange(
uriString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ public Result<IntegrationData> applyConnectionDetails(final IntegrationData data

return this.lmsAccessRequest.protectedRun(() -> this.lmsIntegrationAPI
.applyConnectionDetails(data)
.onError(error -> log.error("Failed to apply LMS full integration: ", error))
.getOrThrow());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -1412,7 +1413,7 @@ ResponseEntity<String> 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);
}

Expand Down

0 comments on commit 07eb238

Please sign in to comment.