ProcessingContext.copy(passwordValidationCallback.getRuntimeProperties(), context);
Callback[] callbacks = new Callback[]{passwordValidationCallback};
boolean result = false;
try {
callbackHandler.handle(callbacks);
RealmAuthenticationAdapter adapter = passwordValidationCallback.getRealmAuthenticationAdapter();
if (passwordValidationCallback.getValidator() != null) {
result = passwordValidationCallback.getResult();
if (result == true) {
updateUsernameInSubject(getSubject(context), username, password);
}
} else if (adapter != null) {
result = adapter.authenticate(getSubject(context), username, password, context);
} else {
log.log(Level.SEVERE, LogStringsMessages.WSS_0295_PASSWORD_VAL_NOT_CONFIG_USERNAME_VAL());
throw new XWSSecurityException("Error: No PasswordValidator Configured for UsernameToken Validation");
}
} catch (Exception e) {