// Path: src/main/java/com/edwise/completespring/entities/UserAccount.java
// @Document(collection = "users")
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode(exclude = {"id"}, doNotUseGetters = true)
// @ToString(doNotUseGetters = true)
// public class UserAccount {
// 
//     @Id
//     private Long id;
// 
//     private String username;
//     private String password;
// 
//     @NonNull
//     private UserAccountType userType = UserAccountType.REST_USER;
// }
// 
// Path: src/main/java/com/edwise/completespring/repositories/UserAccountRepository.java
// public interface UserAccountRepository extends MongoRepository<UserAccount, Long> {
// 
//     UserAccount findByUsername(String username);
// }


import com.edwise.completespring.entities.UserAccount;
import com.edwise.completespring.repositories.UserAccountRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.authentication.configuration.GlobalAuthenticationConfigurerAdapter;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
package com.edwise.completespring.config;


@Configuration
@Slf4j
public class SpringSecurityAuthenticationConfig extends GlobalAuthenticationConfigurerAdapter {

    @Autowired
// Path: src/main/java/com/edwise/completespring/entities/UserAccount.java
// @Document(collection = "users")
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode(exclude = {"id"}, doNotUseGetters = true)
// @ToString(doNotUseGetters = true)
// public class UserAccount {
// 
//     @Id
//     private Long id;
// 
//     private String username;
//     private String password;
// 
//     @NonNull
//     private UserAccountType userType = UserAccountType.REST_USER;
// }
// 
// Path: src/main/java/com/edwise/completespring/repositories/UserAccountRepository.java
// public interface UserAccountRepository extends MongoRepository<UserAccount, Long> {
// 
//     UserAccount findByUsername(String username);
// }


// Path: src/main/java/com/edwise/completespring/config/SpringSecurityAuthenticationConfig.java
import com.edwise.completespring.entities.UserAccount;
import com.edwise.completespring.repositories.UserAccountRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.authentication.configuration.GlobalAuthenticationConfigurerAdapter;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

package com.edwise.completespring.config;


@Configuration
@Slf4j
public class SpringSecurityAuthenticationConfig extends GlobalAuthenticationConfigurerAdapter {

    @Autowired
    private UserAccountRepository userAccountRepository;