code: async def verify(self, headers: Mapping, method=None, path=None):
          if not 'authorization' in headers:
              return False
          auth_type, auth_params = parse_authorization_header(headers['authorization'])
          if auth_type.lower() != 'signature':
              return False
          for param in ('algorithm', 'keyId', 'signature'):
              if param not in auth_params:
                  raise VerifierException("Unsupported HTTP signature, missing '{}'".format(param))
          auth_headers = (auth_params.get('headers') or 'date').lower().strip().split()
          missing_reqd = set(self._required_headers) - set(auth_headers)
          if missing_reqd:
              error_headers = ', '.join(missing_reqd)
              raise VerifierException(
                  'One or more required headers not provided: {}'.format(error_headers))
          key_id, algo = auth_params['keyId'], auth_params['algorithm']
          if not self._handlers.supports(algo):
              raise VerifierException("Unsupported HTTP signature algorithm '{}'".format(algo))
          pubkey = await self._key_finder.find_key(key_id, algo)
          if not pubkey:
              raise VerifierException("Cannot locate public key for '{}'".format(key_id))
          LOGGER.debug("Got %s public key for '%s': %s", algo, key_id, pubkey)
          handler = self._handlers.create_verifier(algo, pubkey)
          message = generate_message(auth_headers, headers, method, path)
          signature = auth_params['signature']
          raw_signature = decode_string(signature, 'base64')
          if handler.verify(message, raw_signature):
              return {
                  'verified': True,
                  'algorithm': algo,
                  'headers': auth_headers,
                  'keyId': key_id,
                  'key': pubkey,
                  'signature': signature
              }
          raise VerifierException("Signature could not be verified for keyId '{}'".format(key_id))