Skip to content

feature: Add uw-frame compatible REST API for /profile

This pull request adds a REST resource under /profile that transforms the current UWUserDetails into a format matching uw-frame's session.json feed.

With this feature in place, uw-frame apps will be able to have the user attributes from the UW Spring Security principal display in the frame header.

Here's the familiar Amy Administrator, as output from GET /profile/uw-frame:

{
  username: "admin",
  displayName: "Amy Administrator",
  firstName: "Amy",
  lastName: "Administrator",
  serverName: "",
  version: "",
  sessionKey: ""
}

To configure this feature in a uw-frame app, one needs to create a file named src/main/webapp/js/override.js (if not already present) with the following contents:

define(['angular'], function(angular) {
    var config = angular.module('override', []);
    config
        .constant('OVERRIDE', {
            'SERVICE_LOC': {
                'sessionInfo' : 'profile/uw-frame',
            }
        })
    ;
    return config;
});

Notify @andrew-petro @levett @ahoffmann @paul.erickson @bjsousa @andrew-summers @alundholm

To assignee @dwitter2 - the plan is to use this for capital-equipment and iaa-diagnostic-tool, among others, then we no longer have the mismatch in our demos (with frame defaulting to showing one logged in as 'Bucky').

Merge request reports