Signature Validation Failed (Namirial)
While using IDPs like aruba, poste etc. the users are successfully able to login. Instead in the case of Namirial the server always gives:
Invalid Response. Signature validation failed
from
https://github.com/italia/spid-php-lib/blob/50d7979e3abfe047f21c92c04bba9897724450cf/src/Spid/Saml/In/BaseResponse.php#L99
It works fixing /src/Spid/Saml/Idp.php from
$metadata['idpCertValue'] = self::formatCert($xml->xpath('//ds:X509Certificate')[0]->__toString());
to
$metadata['idpCertValue'] = self::formatCert($xml->xpath('//md:IDPSSODescriptor//ds:X509Certificate')[0]->__toString());
It works fixing
/src/Spid/Saml/Idp.phpfrom$metadata['idpCertValue'] = self::formatCert($xml->xpath('//ds:X509Certificate')[0]->__toString());to$metadata['idpCertValue'] = self::formatCert($xml->xpath('//md:IDPSSODescriptor//ds:X509Certificate')[0]->__toString());
Occhio che poi non funziona con LEPIDA, meglio un condizionale