CategoryProfile profile = authenticationManager.getSessionController()
.getProfileProvider().getCategoryProfile(
((UserDetails) auth.getDetails()).getCategory());
session.setMaxInactiveInterval(profile.getInactiveInterval() * 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());
}
}