throws XWSSecurityException {
PasswordValidationCallback.DigestPasswordRequest request =
new PasswordValidationCallback.DigestPasswordRequest(
username, passwordDigest, nonce, created);
PasswordValidationCallback passwordValidationCallback =
new PasswordValidationCallback(request);
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, null);
}
} else if (adapter != null) {
result = adapter.authenticate(getSubject(context), username, passwordDigest, nonce, created, context);