@Override
public boolean checkCredentials(String username, String password) {
NameCallback ncb = new NameCallback("Username", username);
Callback passwordCallback;
if (verifyPasswordCallback) {
passwordCallback = new VerifyPasswordCallback(password);
} else {
passwordCallback = new PasswordCallback("Password", false);
}
Callback[] callbacks = new Callback[]{ncb, passwordCallback};