def add_default_headers(self, headers):
        #Authentication
        username = self.user_id
        password = self.key
        base64string =  base64.encodestring(
                '%s:%s' % (username, password))[:-1]
        authheader =  "Basic %s" % base64string
        headers['Authorization']= authheader

        return headers
dataset/ETHPy150Open secondstory/dewpoint/libcloud/drivers/ecp.py/ECPConnection.add_default_headers/original