dirContext = _rootContext;
LOG.debug("Using _rootContext for role lookup.");
}
List roles = getUserRolesByDn(dirContext, userDn, username);
UserInfo userInfo = new UserInfo(username, null, roles);
if (_cacheDuration > 0) {
USERINFOCACHE.put(cacheToken,
new CachedUserInfo(userInfo,
System.currentTimeMillis() + _cacheDuration));
LOG.debug("Adding " + username + " set to expire: " + System.currentTimeMillis() + _cacheDuration);