code: def check(self, request, secret):
          
          if request.get_header("Authorization") == "":
              return False
          ah = self.parse_auth_headers(request.get_header("Authorization"))
          if "signature" not in ah:
              return False
          if request.get_header('x-authorization-timestamp') == '':
              raise KeyError("X-Authorization-Timestamp is required.")
          timestamp = int(float(request.get_header('x-authorization-timestamp')))
          if timestamp == 0:
              raise ValueError("X-Authorization-Timestamp must be a valid, non-zero timestamp.")
          if self.preset_time is None:
              curr_time = time.time()
          else:
              curr_time = self.preset_time
          if timestamp > curr_time + 900:
              raise ValueError("X-Authorization-Timestamp is too far in the future.")
          if timestamp < curr_time - 900:
              raise ValueError("X-Authorization-Timestamp is too far in the past.")
          if request.body is not None and request.body != b'':
              content_hash = request.get_header("x-authorization-content-sha256")
              if content_hash == '':
                  raise KeyError("X-Authorization-Content-SHA256 is required for requests with a request body.")
              sha256 = hashlib.sha256()
              sha256.update(request.body)
              if content_hash != base64.b64encode(sha256.digest()).decode('utf-8'):
                  raise ValueError("X-Authorization-Content-SHA256 must match the SHA-256 hash of the request body.")
          return ah["signature"] == self.sign(request, ah, secret)
docs: Verifies whether or not the request bears an authorization appropriate and valid for this version of the signature.
          This verifies every element of the signature, including the timestamp's value.
          Does not alter the request.
  
          Keyword arguments:
          request -- A request object which can be consumed by this API.
          secret -- The base64-encoded secret key for the HMAC authorization.