

def verify_return(self, entity_id, return_url):
    for endp in self.metadata.discovery_response(entity_id):
        try:
            assert return_url.startswith(endp['location'])
        except AssertionError:
            pass
        else:
            return True
    return False

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/discovery.py DiscoveryServer.verify_return/original