|
@@ -18,6 +18,7 @@ import org.springframework.security.web.authentication.AbstractAuthenticationPro
|
|
|
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
|
|
|
|
|
import com.ym.mec.auth.api.dto.SysUserInfo;
|
|
|
+import com.ym.mec.auth.api.enums.SysUserType;
|
|
|
import com.ym.mec.auth.config.constant.SecurityConstants;
|
|
|
import com.ym.mec.auth.config.token.PhoneAuthenticationToken;
|
|
|
import com.ym.mec.auth.service.SysUserService;
|
|
@@ -59,8 +60,8 @@ public class PhoneLoginAuthenticationFilter extends AbstractAuthenticationProces
|
|
|
throw new UsernameNotFoundException("用户名或密码错误");
|
|
|
}
|
|
|
|
|
|
- if (!StringUtils.equalsIgnoreCase(clientId, userInfo.getSysUser().getUserType().getCode())) {
|
|
|
- throw new LockedException("用户名或密码错误");
|
|
|
+ if (userInfo.getSysUser().getUserType() != SysUserType.SYSTEM && !StringUtils.equalsIgnoreCase(clientId, userInfo.getSysUser().getUserType().getCode())) {
|
|
|
+ throw new LockedException("登录失败");
|
|
|
}
|
|
|
|
|
|
principal = principal.trim();
|