def _construct_basic_auth_header(self, username, password):
        # https://stackoverflow.com/q/5495452/8207
        encoded_auth = base64.b64encode(bytes(f'{username}:{password}', 'utf8')).decode('utf8')
        return f'Basic {encoded_auth}'