remove cringe

This commit is contained in:
Konstantin 2025-02-20 13:54:53 +03:00
parent 9000c6b9a1
commit 2b0c82c23c
3 changed files with 0 additions and 44 deletions

View File

@ -1,11 +0,0 @@
package com.example.nto.model.dto;
import lombok.Builder;
import lombok.Data;
@Builder
@Data
public class AuthCredentials {
private String login;
private String password;
}

View File

@ -1,7 +0,0 @@
package com.example.nto.service;
import com.example.nto.model.entity.Employee;
public interface EmployeeCredentialsService {
}

View File

@ -1,26 +0,0 @@
package com.example.nto.service.impl;
import com.example.nto.model.entity.Employee;
import com.example.nto.repository.EmployeeRepository;
import com.example.nto.service.EmployeeCredentialsService;
import com.example.nto.service.EmployeeService;
import com.example.nto.service.exception.EmployeeNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@Service
public class EmployeeCredentialsServiceImpl implements EmployeeCredentialsService, UserDetailsService {
@Autowired
private EmployeeRepository employeeRepository;
@Override
public UserDetails loadUserByUsername(String login) throws UsernameNotFoundException {
return employeeRepository.findEmployeeByLogin(login);
}
}