// Path: src/main/java/com/lyubenblagoev/postfixrest/repository/UserRepository.java
// public interface UserRepository extends JpaRepository<User, Long> {
// 
//     @Query("FROM User u LEFT JOIN FETCH u.roles WHERE u.email = :email")
//     Optional<User> findByEmail(String email);
// 
// }


import com.lyubenblagoev.postfixrest.repository.UserRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsPasswordService;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
package com.lyubenblagoev.postfixrest.security;


@Service
public class CustomUserDetailsPasswordService implements UserDetailsPasswordService {

    private static final Logger logger = LoggerFactory.getLogger(CustomUserDetailsPasswordService.class);

// Path: src/main/java/com/lyubenblagoev/postfixrest/repository/UserRepository.java
// public interface UserRepository extends JpaRepository<User, Long> {
// 
//     @Query("FROM User u LEFT JOIN FETCH u.roles WHERE u.email = :email")
//     Optional<User> findByEmail(String email);
// 
// }


// Path: src/main/java/com/lyubenblagoev/postfixrest/security/CustomUserDetailsPasswordService.java
import com.lyubenblagoev.postfixrest.repository.UserRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsPasswordService;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

package com.lyubenblagoev.postfixrest.security;


@Service
public class CustomUserDetailsPasswordService implements UserDetailsPasswordService {

    private static final Logger logger = LoggerFactory.getLogger(CustomUserDetailsPasswordService.class);

    private final UserRepository userRepository;