Saml2.Authentication.Core
Saml2.Authentication.Core copied to clipboard
Saml2Exception: Assertion signature could not be verified
Hi! First of all, thank you to made this amazing project to handle saml authentication!
Second, i have this exception:

The xml saml response sent by azure looks ok, but somehow fail in this point i can´t figute out why.
Can you help me please ?
comment the following two lines inside XmlSignatureUtils.cs if the signature is already verified.
//var result = signedXml.CheckSignature(alg); //Edited //return result;
/// Verifies the signature of the XmlElement instance using the key given as a parameter.
/// true if the element's signature can be verified. false if the signature could
/// not be verified.
/// if the XmlDocument instance does not contain a signed XML element.
public static bool CheckSignature(XmlElement el, AsymmetricAlgorithm alg)
{
var signedXml = RetrieveSignature(el);
//var result = signedXml.CheckSignature(alg); //Edited
//return result;
return true;
}