Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
petertownsend opened this issue Jan 27, 2019 · 0 comments

Comments

@petertownsend
Copy link

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; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant