NodeList publicKeyElements = consumerInfoDoc.getElementsByTagName(PUBLIC_KEY_ELEMENT_NAME);
if (publicKeyElements.getLength() == 1) {
return publicKeyElements.item(0).getTextContent();
}
}
throw new PublicKeyVerificationFailureException("Failed to fetch public key for verification. Response status: " + response.getStatus());
}
});
return publicKeyPromise;
}