public static void set(final HttpSession session, final UserIdentity userIdentity) {
        LOGGER.debug(() -> LogUtil.message("Setting userIdentity {} of type {} in session {}",
                userIdentity,
                NullSafe.get(userIdentity, UserIdentity::getClass, Class::getSimpleName),
                NullSafe.get(session, HttpSession::getId)));

        session.setAttribute(SESSION_USER_IDENTITY, userIdentity);
    }
Set the {@link UserIdentity} on the session
stroom-security/stroom-security-common-impl/src/main/java/stroom/security/common/impl/UserIdentitySessionUtil.java