code: def verify(self, signature):
          
          try:
              payload = self._payload()
              sigin = b'.'.join([self.protected.encode('utf-8'), payload])
              self.engine.verify(self.key, sigin, signature)
          except Exception as e:  # pylint: disable=broad-except
              raise InvalidJWSSignature('Verification failed', repr(e))
          return True
docs: Verifies a signature
  
          :raises InvalidJWSSignature: if the verification fails.