connectordb/_websocket.py
def setauth(self,basic_auth):
        """ setauth can be used during runtime to make sure that authentication is reset.
        it can be used when changing passwords/apikeys to make sure reconnects succeed """
        self.headers = []
        # If we have auth
        if basic_auth is not None:
            # we use a cheap hack to get the basic auth header out of the auth object.
            # This snippet ends up with us having an array of the necessary headers
            # to perform authentication.
            class auth_extractor():
                def __init__(self):
                    self.headers = {}

            extractor = auth_extractor()
            basic_auth(extractor)

            for header in extractor.headers:
                self.headers.append("%s: %s" % (header, extractor.headers[header]))
def setauth(self,basic_auth):
        """ setauth can be used during runtime to make sure that authentication is reset.
        it can be used when changing passwords/apikeys to make sure reconnects succeed """
        self.headers = []
        # If we have auth
        if basic_auth is not None:
            # we use a cheap hack to get the basic auth header out of the auth object.
            # This snippet ends up with us having an array of the necessary headers
            # to perform authentication.
            class auth_extractor():
                def __init__(self):
                    self.headers = {}

            extractor = auth_extractor()
            basic_auth(extractor)

            for header in extractor.headers:
                self.headers.append("%s: %s" % (header, extractor.headers[header]))
setauth can be used during runtime to make sure that authentication is reset.
        it can be used when changing passwords/apikeys to make sure reconnects succeed