| | |
| | | @Service |
| | | public class AuthenticationServiceImpl implements AuthenticationService { |
| | | |
| | | |
| | | private final UserService userService; |
| | | private final SystemConfig systemConfig; |
| | | |
| | | @Autowired |
| | | public AuthenticationServiceImpl(UserService userService, SystemConfig systemConfig) { |
| | | this.userService = userService; |
| | | public AuthenticationServiceImpl(SystemConfig systemConfig) { |
| | | this.systemConfig = systemConfig; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param username username |
| | | * @param password password |
| | | * @return boolean |
| | | */ |
| | | @Override |
| | | public boolean authUser(String username, String password) { |
| | | User user = userService.getUserByUserName(username); |
| | | return authUser(user, username, password); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean authUser(User user, String username, String password) { |