'Verify that the assertion is syntactically correct and
the signature is correct if present.
:param key_file: If not the default key file should be used this is it.'

def verify(self, key_file=''):

    try:
        res = self._verify()
    except AssertionError as err:
        logger.error(('Verification    error    on    the    response:    %s' % err))
        raise
    else:
        if (res is None):
            return None
    if (not isinstance(self.response, samlp.Response)):
        return self
    if self.parse_assertion(key_file):
        return self
    else:
        logger.error('Could    not    parse    the    assertion')
        return None
