// 避免login没有权限,出现死循环
if (!freeResources.contains(resource) && !monitor.isPublicResource(resource)) {
OnlineActivity info = monitor.getAuthenticationManager().getSessionController()
.getOnlineActivity(session.getId());
if (null == info) {
Authentication auth = null;
// remember me
if (monitor.isEnableRememberMe()) {
auth = monitor.getRememberMeService().autoLogin(httpRequest);
}
if (null == auth) {
auth = new SsoAuthentication(httpRequest);
auth.setDetails(userDetailsSource.buildDetails(httpRequest));
}
try {
monitor.authenticate(auth);
} catch (AuthenticationException e) {
// 记录访问失败的URL