Closed
Description
Summary
Fail to logout in a Spring MVC Controller via HttpServletRequest.logout().
@Controller
@RequestMapping(value = "/xxx")
public class XxxControler {
@GetMapping(value = "/yyy")
public String someMethod(HttpServletRequest request) throws Exception {
request.logout();
return "some JSP";
}
}
Actual Behavior
SecurityContext is not cleared. The user is still treated as authenticated.
Expected Behavior
SecurityContext should be cleared and the user should be treated as unauthenticated.
Version
Spring Boot 1.5.4 (with Spring Security 4.2.3)