|
|
@@ -67,6 +67,7 @@ public class SkyDaoAuthenticationProvider extends AbstractUserDetailsAuthenticat
|
|
|
public SkyDaoAuthenticationProvider(String active) {
|
|
|
this.active = active;
|
|
|
setMessageSource(SpringUtil.getBean("securityMessageSource"));
|
|
|
+ setHideUserNotFoundExceptions(false);
|
|
|
setPasswordEncoder(PasswordEncoderFactories.createDelegatingPasswordEncoder());
|
|
|
}
|
|
|
|
|
|
@@ -93,7 +94,7 @@ public class SkyDaoAuthenticationProvider extends AbstractUserDetailsAuthenticat
|
|
|
throw new BadCredentialsException(ErrorTypeEnum.BAD_CREDENTIALS.getDescription());
|
|
|
}
|
|
|
//开发和环境去掉密码验证
|
|
|
- if(!"dev".equals(active) && !"test".equals(active)){
|
|
|
+// if(!"dev".equals(active) && !"test".equals(active)){
|
|
|
String presentedPassword = authentication.getCredentials().toString();
|
|
|
if(userDetails instanceof KxsSecurityUser user && (CharSequenceUtil.isNotBlank(user.getSalt()))){
|
|
|
presentedPassword = presentedPassword + user.getSalt();
|
|
|
@@ -103,7 +104,7 @@ public class SkyDaoAuthenticationProvider extends AbstractUserDetailsAuthenticat
|
|
|
this.logger.debug("Failed to authenticate since password does not match stored value");
|
|
|
throw new BadCredentialsException(ErrorTypeEnum.BAD_CREDENTIALS.getDescription());
|
|
|
}
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|