HttpSession session = request.getSession();
int min = authenticationManager.getSessionController().getInactiveInterval(
((UserDetails) auth.getDetails()).getCategory());
session.setMaxInactiveInterval(min * 60);
((ServletRequestAware) auth).setRequest(null);
UserDetails details = (UserDetails) auth.getDetails();
if (null == details) {
return;
}
session.setAttribute(Authentication.USERID, details.getUserid());
session.setAttribute(Authentication.LOGINNAME, auth.getPrincipal());
session.setAttribute(Authentication.FULLNAME, details.getFullname());
session.setAttribute(Authentication.USER_CATEGORYID, details.getCategory().getId());
logger.debug(
"added session attributes USERID,LOGINNAME,USERNAME,USER_CATEGORYID for {}",
auth.getPrincipal());
}
}