Ok, it all works if you don't use the salt. If you look at the SystemWideSaltSource code, all it does is hold a String....... that's it. I don't see how that can break your code. The only thing I can think is going wrong is that the password in the database isn't encoded with the salt. I'm presuming you have some code like the one below and you are injecting in the same passwordEncoder and saltSource. Other than that I'm at a loss, I can't see why it wouldn't work. Could you post your applicationContext.xml and the code that you've written for this?
Code:
public class MyClass {
private PasswordEncoder passwordEncoder = new PlaintextPasswordEncoder();
private SaltSource saltSource;
public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
this.passwordEncoder = passwordEncoder;
}
public void setSaltSource(SaltSource saltSource) {
this.saltSource = saltSource;
}
public String encode(String toEncode) {
Object salt = null;
if (this.saltSource != null) {
salt = this.saltSource.getSalt(userDetails);
}
this.passwordEncoder.encodePassword(toEncode, saltSource);
}
}
http://www.acegisecurity.org/multipr...altSource.html