|
@@ -13,6 +13,8 @@ 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.crypto.password.PasswordEncoder; |
|
|
import org.springframework.security.crypto.password.PasswordEncoder; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Author LiuXinXin |
|
|
* @Author LiuXinXin |
|
|
* @Date 2020/8/3 8:55 下午 |
|
|
* @Date 2020/8/3 8:55 下午 |
|
@@ -44,6 +46,9 @@ public class CredentialAuthProvider implements AuthenticationProvider { |
|
|
throw new BadCredentialsException("login fail! 浙政钉校验失败"); |
|
|
throw new BadCredentialsException("login fail! 浙政钉校验失败"); |
|
|
} |
|
|
} |
|
|
String accountId = accountResult.getData(); |
|
|
String accountId = accountResult.getData(); |
|
|
|
|
|
if (Objects.isNull(accountId)) { |
|
|
|
|
|
throw new BadCredentialsException("login fail! 浙政钉校验失败"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
user = userDetailsService.loadUserByUsername(accountId + UserDeatilsServiceConstant.USER_DETAILS_SERVICE_SEPARATOR + loginTypeEnum.name()); |
|
|
user = userDetailsService.loadUserByUsername(accountId + UserDeatilsServiceConstant.USER_DETAILS_SERVICE_SEPARATOR + loginTypeEnum.name()); |
|
|
} |
|
|
} |
|
|