/**
* Checks the specified password against the master password.
*/
public boolean checkMasterPassword(char[] passwd) {
GeoServerDigestPasswordEncoder pwEncoder =
loadPasswordEncoder(GeoServerDigestPasswordEncoder.class);
if (masterPasswdDigest == null) {
synchronized (this) {
if (masterPasswdDigest == null) {
try {
//look for file
masterPasswdDigest = loadMasterPasswordDigest();
}
catch(IOException e) {
throw new RuntimeException("Unable to create master password digest", e);
}
}
}
}
return pwEncoder.isPasswordValid(masterPasswdDigest, passwd, null);
}