src/Saml.php
public function validateSignature($message, XMLSecurityKey $key)
    {
        $reader = $message->getSignature();
        if ($reader instanceof AbstractSignatureReader) {
            try {
                return $reader->validate($key);
            } catch (\Exception $e) {
                throw new SamlException('urn:oasis:names:tc:SAML:2.0:status:RequestDenied', $e);
            }
        } else {
            throw new SecurityException('Saml message signature is not specified');
        }
    }
public function validateSignature($message, XMLSecurityKey $key)
    {
        $reader = $message->getSignature();
        if ($reader instanceof AbstractSignatureReader) {
            try {
                return $reader->validate($key);
            } catch (\Exception $e) {
                throw new SamlException('urn:oasis:names:tc:SAML:2.0:status:RequestDenied', $e);
            }
        } else {
            throw new SecurityException('Saml message signature is not specified');
        }
    }
public function validateSignature ( $ message , XMLSecurityKey $ key ) { $ reader = $ message -> getSignature ( ) ; if ( $ reader instanceof AbstractSignatureReader ) { try { return $ reader -> validate ( $ key ) ; } catch ( \ Exception $ e ) { throw new SamlException ( 'urn:oasis:names:tc:SAML:2.0:status:RequestDenied' , $ e ) ; } } else { throw new SecurityException ( 'Saml message signature is not specified' ) ; } }
Validate a signed message

@param SamlMessage|Assertion $message
@param XMLSecurityKey        $key

@return bool

@throws SamlException|SecurityException
Validate a signed message