diff --git a/uw-spring-security-web/src/main/java/edu/wisc/uwss/web/ProfileController.java b/uw-spring-security-web/src/main/java/edu/wisc/uwss/web/ProfileController.java index 5d999307bd235855c28574230cea0a7b8b3f81c8..6f27f0859a220a3e51953e604dc9246041182883 100644 --- a/uw-spring-security-web/src/main/java/edu/wisc/uwss/web/ProfileController.java +++ b/uw-spring-security-web/src/main/java/edu/wisc/uwss/web/ProfileController.java @@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; +import java.util.HashMap; +import java.util.Map; + import edu.wisc.uwss.UWUserDetails; import edu.wisc.uwss.web.uwframe.UwframeSession; @@ -60,11 +63,13 @@ public class ProfileController { */ @RequestMapping(value="/profile/uw-frame", method=RequestMethod.GET) public @ResponseBody Object uwFrameCompatibleProfile(@AuthenticationPrincipal Object principal) { + Map<String, UwframeSession> response = new HashMap<>(); if(principal instanceof UWUserDetails) { - return new UwframeSession(environment, (UWUserDetails) principal); + response.put("person", new UwframeSession(environment, (UWUserDetails) principal)); } else { - return new UwframeSession(environment); + response.put("person", new UwframeSession(environment)); } + return response; } }