Remove session authentication

pull/146/head
johnniang 2019-04-29 13:52:45 +08:00
parent 7c6708d5f4
commit 1a7f621502
1 changed files with 0 additions and 14 deletions

View File

@ -115,20 +115,6 @@ public class AdminAuthenticationFilter extends AbstractAuthenticationFilter {
return; return;
} }
// Get info from session
Object adminSessionValue = request.getSession().getAttribute(ADMIN_SESSION_KEY);
if (adminSessionValue instanceof UserDetail) {
// Convert to user detail
UserDetail userDetail = (UserDetail) adminSessionValue;
// Set security context
SecurityContextHolder.setContext(new SecurityContextImpl(new AuthenticationImpl(userDetail)));
filterChain.doFilter(request, response);
return;
}
if (shouldSkipAuthenticateFailure(request)) { if (shouldSkipAuthenticateFailure(request)) {
// If should skip this authentication failure // If should skip this authentication failure
log.debug("Skipping authentication failure, url: [{}], method: [{}]", request.getServletPath(), request.getMethod()); log.debug("Skipping authentication failure, url: [{}], method: [{}]", request.getServletPath(), request.getMethod());