Skip to content

Commit

Permalink
Development: Update spring security LTI library to 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
krusche committed Dec 27, 2024
1 parent 422dd83 commit 116ed6a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ dependencies {

implementation "org.apache.logging.log4j:log4j-to-slf4j:2.24.3"

// Note: spring-security-lti13 does not work with jakarta yet, so we built our own custom version and declare its transitive dependencies below
// implementation "uk.ac.ox.ctl:spring-security-lti13:0.1.11"
implementation files("libs/spring-security-lti13-0.1.13.jar")
implementation "uk.ac.ox.ctl:spring-security-lti13:0.3.0"

// https://search.maven.org/artifact/org.eclipse.jgit/org.eclipse.jgit
implementation "org.eclipse.jgit:org.eclipse.jgit:${jgit_version}"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ node_version=22.12.0
npm_version=10.9.0

# Dependency versions
jhipster_dependencies_version=8.7.2
jhipster_dependencies_version=8.8.0
spring_boot_version=3.4.1
spring_framework_version=6.2.1
spring_cloud_version=4.2.0
Expand Down
Binary file removed libs/spring-security-lti13-0.1.13.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private OidcAuthenticationToken finishOidcFlow(HttpServletRequest request, HttpS
throw new IllegalStateException("No authentication was returned");
}
}
catch (OAuth2AuthenticationException | IllegalStateException ex) {
catch (OAuth2AuthenticationException | IllegalStateException | IOException | ServletException ex) {
throw new IllegalStateException("Failed to attempt LTI 1.3 login authentication: " + ex.getMessage(), ex);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public ContinuousIntegrationService.BuildStatus getBuildStatusOfPlan(String proj
}

try {
var uri = UriComponentsBuilder.fromHttpUrl(serverUrl.toString()).pathSegment("job", projectKey, "job", planKey, "lastBuild", "api", "json").build().toUri();
var uri = UriComponentsBuilder.fromUriString(serverUrl.toString()).pathSegment("job", projectKey, "job", planKey, "lastBuild", "api", "json").build().toUri();
var response = restTemplate.getForObject(uri, JsonNode.class);
var isJobBuilding = response.get("building").asBoolean();
return isJobBuilding ? ContinuousIntegrationService.BuildStatus.BUILDING : ContinuousIntegrationService.BuildStatus.INACTIVE;
Expand Down Expand Up @@ -475,7 +475,7 @@ public void givePlanPermissions(ProgrammingExercise programmingExercise, String
*/
public void enablePlan(String projectKey, String planKey) {
try {
var uri = UriComponentsBuilder.fromHttpUrl(serverUrl.toString()).pathSegment("job", projectKey, "job", planKey, "enable").build(true).toUri();
var uri = UriComponentsBuilder.fromUriString(serverUrl.toString()).pathSegment("job", projectKey, "job", planKey, "enable").build(true).toUri();
restTemplate.postForEntity(uri, null, String.class);
}
catch (HttpClientErrorException e) {
Expand Down

0 comments on commit 116ed6a

Please sign in to comment.