italia / spid-php-lib

PHP package for SPID authentication
BSD 3-Clause "New" or "Revised" License
29 stars 37 forks source link

Signature Validation Failed (Namirial) #111

Open i1990jain opened 4 years ago

i1990jain commented 4 years ago

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

lrealdi commented 3 years ago

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());

fabio0 commented 3 years ago

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());

Occhio che poi non funziona con LEPIDA, meglio un condizionale