Exemplo n.º 1
0
  def IsResponseAuthenticated( self, headers, content ):
    if not self._HasHeader( headers ):
      return False

    return compare_digest( self._GetHmacHeader( headers ),
                           self._Hmac( content ) )
Exemplo n.º 2
0
    def is_response_authenticated(self, headers, content):
        if not self._has_header(headers):
            return False

        return compare_digest(self._get_hmac_header(headers),
                              self._hmac(content))
Exemplo n.º 3
0
  def IsRequestAuthenticated( self, headers, method, path, body ):
    if not self._HasHeader( headers ):
      return False

    return compare_digest( self._GetHmacHeader( headers ),
                           self._ComputeRequestHmac( method, path, body ) )
Exemplo n.º 4
0
    def is_request_authenticated(self, headers, method, path, body):
        if not self._has_header(headers):
            return False

        return compare_digest(self._get_hmac_header(headers),
                              self._compute_request_hmac(method, path, body))