Control usernameParameter for UserDetailsService

This commit is contained in:
hou27
2022-06-11 01:09:54 +09:00
parent b033747ec3
commit 1eee369124
5 changed files with 5 additions and 3 deletions

View File

@@ -31,7 +31,6 @@ public class JwtTokenFilter extends OncePerRequestFilter {
SecurityContextHolder.getContext().setAuthentication(auth); // 정상 토큰이면 SecurityContext에 저장
}
} catch (CustomException ex) {
//this is very important, since it guarantees the user is not authenticated at all
SecurityContextHolder.clearContext();
response.sendError(ex.getHttpStatus().value(), ex.getMessage());
return;