remove cringe
This commit is contained in:
parent
9000c6b9a1
commit
2b0c82c23c
@ -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;
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
package com.example.nto.service;
|
|
||||||
|
|
||||||
import com.example.nto.model.entity.Employee;
|
|
||||||
|
|
||||||
public interface EmployeeCredentialsService {
|
|
||||||
|
|
||||||
}
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user