diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-08-23 21:03:51 +0800 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-08-27 21:47:22 +0800 |
commit | 401f5f48e9b26628c7df8f1d97336cebbab870c0 (patch) | |
tree | ce8b2f081e42470b491d6ccc3c161d0d1d6c38ec /libempathy/empathy-uoa-auth-handler.c | |
parent | 26aa1b3654cab66d91e0ada194be547e790a847b (diff) | |
download | gsoc2013-empathy-401f5f48e9b26628c7df8f1d97336cebbab870c0.tar gsoc2013-empathy-401f5f48e9b26628c7df8f1d97336cebbab870c0.tar.gz gsoc2013-empathy-401f5f48e9b26628c7df8f1d97336cebbab870c0.tar.bz2 gsoc2013-empathy-401f5f48e9b26628c7df8f1d97336cebbab870c0.tar.lz gsoc2013-empathy-401f5f48e9b26628c7df8f1d97336cebbab870c0.tar.xz gsoc2013-empathy-401f5f48e9b26628c7df8f1d97336cebbab870c0.tar.zst gsoc2013-empathy-401f5f48e9b26628c7df8f1d97336cebbab870c0.zip |
UOA auth: handle the password mechanism as well
Since password is stored in SSO now, we can use the same code path
than other accounts.
https://bugzilla.gnome.org/show_bug.cgi?id=680776
Diffstat (limited to 'libempathy/empathy-uoa-auth-handler.c')
-rw-r--r-- | libempathy/empathy-uoa-auth-handler.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libempathy/empathy-uoa-auth-handler.c b/libempathy/empathy-uoa-auth-handler.c index 16d664fb6..4b85fca00 100644 --- a/libempathy/empathy-uoa-auth-handler.c +++ b/libempathy/empathy-uoa-auth-handler.c @@ -171,8 +171,8 @@ auth_cb (GObject *source, DEBUG ("SASL Mechanism error: %s", error->message); g_clear_error (&error); - /* Inform SSO that the access token didn't work and it should ask user - * to re-grant access. */ + /* Inform SSO that the access token (or password) didn't work and it should + * ask user to re-grant access (or retype password). */ extra_params = tp_asv_new ( SIGNON_SESSION_DATA_UI_POLICY, G_TYPE_INT, SIGNON_POLICY_REQUEST_PASSWORD, @@ -235,6 +235,12 @@ session_process_cb (SignonAuthSession *session, auth_cb, ctx); break; + case EMPATHY_SASL_MECHANISM_PASSWORD: + empathy_sasl_auth_password_async (ctx->channel, + tp_asv_get_string (session_data, "Secret"), + auth_cb, ctx); + break; + default: g_assert_not_reached (); } @@ -338,5 +344,6 @@ empathy_uoa_auth_handler_supports (EmpathyUoaAuthHandler *self, mech = empathy_sasl_channel_select_mechanism (channel); return mech == EMPATHY_SASL_MECHANISM_FACEBOOK || mech == EMPATHY_SASL_MECHANISM_WLM || - mech == EMPATHY_SASL_MECHANISM_GOOGLE; + mech == EMPATHY_SASL_MECHANISM_GOOGLE || + mech == EMPATHY_SASL_MECHANISM_PASSWORD; } |