Skip to content

SALClient can't connect to new server #67

@TOFarmer

Description

@TOFarmer

Summary

If a SALClient has previously connected to server (i.e. during initialization), connecting to a new server is not possible if the original server required authentication.

Steps to reproduce

If host requires authentication:

sc = SALClient(host)
sc.host = new_host

What is the current bug behavior?

SALClient prompts for username and password (irrespective of whether new_host requires authentication.

What is the expected correct behavior?

No prompt, SALClient should simply connect to new host.

Possible fixes

This occurs because after a host has been set during initialization, SALClient.auth_required has a value determined by this host. When SALClient.host is called a GET request is made (to the new host), and before it is sent SALClient requests credentials because it thinks it has to authenticate (which is true of GET requests made to the original host but not the new one). This can be fixed by simply setting auth_required = False when host is set. If this is done, auth_required can be removed from __init__.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssues that report incorrect or undesirable behaviour(s)Priority: 1EVENTUAL: A low priority issue that is unlikely to be addressed until the priority increases.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions