|
@@ -1,10 +1,8 @@
|
|
package com.keao.edu.auth.core.provider.service;
|
|
package com.keao.edu.auth.core.provider.service;
|
|
|
|
|
|
-import com.keao.edu.auth.api.dto.SysUserInfo;
|
|
|
|
-import com.keao.edu.auth.api.entity.SysUser;
|
|
|
|
-import com.keao.edu.auth.service.SysUserService;
|
|
|
|
-import com.keao.edu.common.security.AuthUser;
|
|
|
|
-import com.keao.edu.common.security.SecurityConstants;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.security.authentication.LockedException;
|
|
import org.springframework.security.authentication.LockedException;
|
|
@@ -14,15 +12,22 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
|
import org.springframework.security.core.userdetails.UserDetails;
|
|
import org.springframework.security.core.userdetails.UserDetails;
|
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
|
|
+import org.springframework.security.crypto.password.PasswordEncoder;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
+import com.keao.edu.auth.api.dto.AuthUser;
|
|
|
|
+import com.keao.edu.auth.api.dto.SysUserInfo;
|
|
|
|
+import com.keao.edu.auth.api.entity.SysUser;
|
|
|
|
+import com.keao.edu.auth.api.util.SecurityConstants;
|
|
|
|
+import com.keao.edu.auth.service.SysUserService;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
public class DefaultUserDetailsService implements UserDetailsService {
|
|
public class DefaultUserDetailsService implements UserDetailsService {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private PasswordEncoder passwordEncoder;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
private SysUserService sysUserService;
|
|
private SysUserService sysUserService;
|
|
|
|
|
|
private final String BCRYPT = "{bcrypt}";
|
|
private final String BCRYPT = "{bcrypt}";
|