Skip to content

SecurityContextHolder setAuthentication is unused? #111

Open
@gafarma89

Description

@gafarma89

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions