Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dippindots committed Feb 7, 2024
1 parent 4c65f5f commit 6351f48
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main/java/org/cbioportal/web/IndexPageController.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Controller;
Expand All @@ -37,16 +36,16 @@ public class IndexPageController {

@Autowired
private HttpRequestUtils requestUtils;

@Autowired
private Environment env;

@Value("${authenticate}")
private String[] authenticate;

@Value("${saml.idp.metadata.entityid:not_defined_in_portalproperties}")
private String samlIdpEntityId;

@Value("${msk.whole.slide.viewer.secret.key:}")
private String wholeSlideViewerKey;

private final ObjectMapper mapper = new ObjectMapper();

private Map<String, String> getFrontendProperties(HttpServletRequest request, Authentication authentication) {
Expand All @@ -57,7 +56,7 @@ private Map<String, String> getFrontendProperties(HttpServletRequest request, Au
// TODO: Support skin.user_display_name
properties.put("user_display_name", authentication != null ? authentication.getName(): "anonymousUser");
// Set MSK slide viewer token at runtime
properties.put("mskWholeSlideViewerToken", getMskWholeSlideViewerToken(env.getProperty("msk.whole.slide.viewer.secret.key"), authentication));
properties.put("mskWholeSlideViewerToken", getMskWholeSlideViewerToken(wholeSlideViewerKey, authentication));
return properties;
}

Expand Down

0 comments on commit 6351f48

Please sign in to comment.