Skip to content

Commit

Permalink
Development: Add Artemis' icon and description to LTI's dynamic regis…
Browse files Browse the repository at this point in the history
…tration info (#9222)
  • Loading branch information
maximiliansoelch committed Aug 31, 2024
1 parent b19db0b commit 26f17fd
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public class Lti13ClientRegistration {
@JsonProperty("jwks_uri")
private String jwksUri;

@JsonProperty("logo_uri")
private String logoUri;

@JsonProperty("token_endpoint_auth_method")
private String tokenEndpointAuthMethod;

Expand Down Expand Up @@ -67,6 +70,7 @@ public Lti13ClientRegistration(String serverUrl, String clientRegistrationId) {
this.setRedirectUris(List.of(serverUrl + "/" + CustomLti13Configurer.LTI13_LOGIN_REDIRECT_PROXY_PATH));
this.setInitiateLoginUri(serverUrl + "/" + CustomLti13Configurer.LTI13_LOGIN_INITIATION_PATH + "/" + clientRegistrationId);
this.setJwksUri(serverUrl + "/.well-known/jwks.json");
this.setLogoUri(serverUrl + "/public/images/logo.png");

Lti13ToolConfiguration toolConfiguration = getLti13ToolConfiguration(serverUrl);
this.setLti13ToolConfiguration(toolConfiguration);
Expand All @@ -83,6 +87,7 @@ private static Lti13ToolConfiguration getLti13ToolConfiguration(String serverUrl
}
toolConfiguration.setDomain(domain);
toolConfiguration.setTargetLinkUri(serverUrl + "/courses");
toolConfiguration.setDescription("Artemis: Interactive Learning with Individual Feedback");
toolConfiguration.setClaims(Arrays.asList("iss", "email", "sub", "name", "given_name", "family_name"));
Message deepLinkingMessage = new Message(CustomLti13Configurer.LTI13_DEEPLINK_MESSAGE_REQUEST, serverUrl + "/" + CustomLti13Configurer.LTI13_DEEPLINK_REDIRECT_PATH);
toolConfiguration.setMessages(List.of(deepLinkingMessage));
Expand Down Expand Up @@ -145,6 +150,14 @@ public void setJwksUri(String jwksUri) {
this.jwksUri = jwksUri;
}

public String getLogoUri() {
return logoUri;
}

public void setLogoUri(String logoUri) {
this.logoUri = logoUri;
}

public String getTokenEndpointAuthMethod() {
return tokenEndpointAuthMethod;
}
Expand Down Expand Up @@ -179,6 +192,8 @@ public static class Lti13ToolConfiguration {
@JsonProperty("target_link_uri")
private String targetLinkUri;

private String description;

private List<Message> messages;

private List<String> claims;
Expand All @@ -199,6 +214,14 @@ public void setTargetLinkUri(String targetLinkUri) {
this.targetLinkUri = targetLinkUri;
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public List<Message> getMessages() {
return messages;
}
Expand Down

0 comments on commit 26f17fd

Please sign in to comment.