Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 9311627

Browse files
authored
Merge pull request #61 from Zenfulcode/patch-matching-password
fixes password was never right
2 parents a7ee834 + e5e378f commit 9311627

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/com/zenfulcode/commercify/commercify/config/JwtAuthenticationFilter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ protected void doFilterInternal(
3939
final String authHeader = request.getHeader("Authorization");
4040

4141
try {
42-
4342
if (authHeader == null || !authHeader.startsWith("Bearer ")) {
4443
filterChain.doFilter(request, response);
4544
return;

src/main/java/com/zenfulcode/commercify/commercify/service/AuthenticationService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public UserDTO authenticate(LoginUserRequest login) {
9090

9191
UserEntity user = userRepository.findByEmail(login.email()).orElseThrow();
9292

93-
if (passwordEncoder.matches(login.password(), user.getPassword()))
93+
if (!passwordEncoder.matches(login.password(), user.getPassword()))
9494
return null;
9595

9696
return mapper.apply(user);

0 commit comments

Comments
 (0)