| | |
| | | package com.ycl.jxkg.service.impl; |
| | | |
| | | import com.ycl.jxkg.configuration.property.SystemConfig; |
| | | import com.ycl.jxkg.domain.User; |
| | | import com.ycl.jxkg.config.property.SystemConfig; |
| | | import com.ycl.jxkg.domain.entity.User; |
| | | import com.ycl.jxkg.service.AuthenticationService; |
| | | import com.ycl.jxkg.service.UserService; |
| | | import com.ycl.jxkg.utility.RsaUtil; |
| | | import com.ycl.jxkg.utils.RsaUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @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) { |