Skip to content

Wrong security call in security configuration #4

@vimahk

Description

@vimahk

I think in this line you should use addFilterBefore() instead of addFilterAfter(). First, we should look for a token, and if it is present and valid, we should skip authentication. But if you use addFilterAfter(), you authenticate every time and won't use the JWT token (of course, only if you provide username/password).

.addFilterAfter(new JwtTokenVerifier(secretKey, jwtConfig),JwtUsernameAndPasswordAuthenticationFilter.class)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions