|
@@ -94,7 +94,7 @@ public class SkyDaoAuthenticationProvider extends AbstractUserDetailsAuthenticat
|
|
|
throw new BadCredentialsException(ErrorTypeEnum.BAD_CREDENTIALS.getDescription());
|
|
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();
|
|
String presentedPassword = authentication.getCredentials().toString();
|
|
|
if(userDetails instanceof KxsSecurityUser user && (CharSequenceUtil.isNotBlank(user.getSalt()))){
|
|
if(userDetails instanceof KxsSecurityUser user && (CharSequenceUtil.isNotBlank(user.getSalt()))){
|
|
|
presentedPassword = presentedPassword + user.getSalt();
|
|
presentedPassword = presentedPassword + user.getSalt();
|
|
@@ -104,7 +104,7 @@ public class SkyDaoAuthenticationProvider extends AbstractUserDetailsAuthenticat
|
|
|
this.logger.debug("Failed to authenticate since password does not match stored value");
|
|
this.logger.debug("Failed to authenticate since password does not match stored value");
|
|
|
throw new BadCredentialsException(ErrorTypeEnum.BAD_CREDENTIALS.getDescription());
|
|
throw new BadCredentialsException(ErrorTypeEnum.BAD_CREDENTIALS.getDescription());
|
|
|
}
|
|
}
|
|
|
-// }
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@SneakyThrows
|
|
@SneakyThrows
|