class AcmLoginSuccessOperations {

    protected void addUserIdToSession(HttpServletRequest request, String userId)
    {
        HttpSession session = request.getSession(true);
        session.setAttribute("acm_username", userId);

        log.debug("Session 'acm_username' set to '{}'", userId);

        // after successful login set the MDC variable (needed for API calls)
        MDC.put(MDCConstants.EVENT_MDC_REQUEST_USER_ID_KEY, userId);
    }

}