Commit 1d506628 authored by chriadam's avatar chriadam

[telepathy-sasl-signon] Only set CredentialsNeedUpdate flag when appropriate

Previously, the CredentialsNeedUpdate flag would be set in a variety
of situations, including when a generic OperationFailed error occurred.
This commit ensures that it is only set for an account when a
UserInteraction error occurs (that is, the account credentials are
valid but need to be refreshed manually by the user).
parent 08eb6976
......@@ -224,14 +224,10 @@ session_process_cb (SignonAuthSession *session,
if (error != NULL)
{
DEBUG ("Error processing the session: %s", error->message);
if (g_error_matches(error, SIGNON_ERROR, SIGNON_ERROR_CREDENTIALS_NOT_AVAILABLE) ||
g_error_matches(error, SIGNON_ERROR, SIGNON_ERROR_INVALID_CREDENTIALS) ||
g_error_matches(error, SIGNON_ERROR, SIGNON_ERROR_MISSING_DATA) ||
g_error_matches(error, SIGNON_ERROR, SIGNON_ERROR_USER_INTERACTION) ||
g_error_matches(error, SIGNON_ERROR, SIGNON_ERROR_OPERATION_FAILED))
if (g_error_matches(error, SIGNON_ERROR, SIGNON_ERROR_USER_INTERACTION))
{
request_password(ctx);
}
}
else
{
auth_context_done (ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment