jwt-spring-security-demo
jwt-spring-security-demo copied to clipboard
SecurityContextHolder setAuthentication is unused?
Hi
first thank for your sharing...
I would like to ask why we need this:
SecurityContextHolder.getContext().setAuthentication(authentication);
source:
https://github.com/szerhusenBC/jwt-spring-security-demo/blob/master/src/main/java/org/zerhusen/security/rest/AuthenticationRestController.java#L44
@PostMapping("/authenticate") method returns only header from controller. Is there any reason of above line? If not, can we remove it?
Thank you