Skip to content

SSO Authentication in RallyRestApi incorrectly overwrites the AuthenticationState to NotAuthorised #43

Open
@petertownsend

Description

@petertownsend

In the method:
private RallyRestApi.AuthenticationResult AuthenticateWithConnectionInfoBaseMethod( ConnectionInfo connectionInfo, bool allowSSO, out string exceptionMessage)

The very end condition is incorrect, it correctly invokes the PerformSsoAuthentication which returns ture when successful (and the state has been changed to Authorized. However it then is caught by the final else which overwrites it with "NotAuthorised" - I suggest changing it to something like:

if (ex is WebException && ((WebException) ex).Status == WebExceptionStatus.ConnectFailure) throw; else if (allowSSO) { if (!this.httpService.PerformSsoAuthentication()) { this.Logout(); throw; } } else { this.AuthenticationState = RallyRestApi.AuthenticationResult.NotAuthorized; exceptionMessage = ex.Message; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions