Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #15 from chriadam/cnufixes
Fix some issues with CredentialsNeedUpdate handling
  • Loading branch information
chriadam committed Dec 11, 2013
2 parents 82b64de + 1d50662 commit f83517c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions telepathy-sasl-signon/empathy-uoa-auth-handler.c
Expand Up @@ -161,7 +161,6 @@ request_password_account_store_cb (AgAccount *account,
error->message);
}

ag_account_select_service (account, ag_account_service_get_service (ctx->service));
auth_context_done(ctx);
}

Expand All @@ -180,10 +179,12 @@ request_password (AuthContext *ctx)
g_value_init (&fromValue, G_TYPE_STRING);
g_value_set_static_string (&fromValue, "telepathy-sasl-signon");

ag_account_select_service (account, NULL);
ag_account_set_value (account, "CredentialsNeedUpdate", &value);
ag_account_set_value (account, "CredentialsNeedUpdateFrom", &fromValue);

DEBUG ("telepathy-sasl-signon: setting CredentialsNeedUpdate on service %s for account: %d",
ag_service_get_name(ag_account_service_get_service (ctx->service)), account->id);

ag_account_store (account, request_password_account_store_cb, ctx);
}

Expand Down Expand Up @@ -223,11 +224,7 @@ 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);
}
Expand Down

0 comments on commit f83517c

Please sign in to comment.