private void UpdateAuthenticationState(String errorMessage = "")
{
if (AuthenticationStateChange != null)
{
switch (Api.AuthenticationState)
{
case RallyRestApi.AuthenticationResult.Authenticated:
AuthenticationStateChange.Invoke(Api.AuthenticationState, null);
AuthenticationStateChange.Invoke(Api.AuthenticationState, Api);
break;
case RallyRestApi.AuthenticationResult.PendingSSO:
AuthenticationStateChange.Invoke(Api.AuthenticationState, null);
break;
case RallyRestApi.AuthenticationResult.NotAuthorized:
AuthenticationStateChange.Invoke(Api.AuthenticationState, null);
break;
default:
throw new NotImplementedException();
}
}
if (Api.AuthenticationState == RallyRestApi.AuthenticationResult.Authenticated)
LoginDetails.SaveToDisk();
}
#endregion