aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2012-10-28 20:25:07 +0800
committerGiovanni Campagna <gcampagna@src.gnome.org>2012-11-02 21:06:26 +0800
commit0bd9b3a86a71b21a9acd215c59e0e8e9108704d5 (patch)
tree22b02f612631d90cef6e5f2eb406de789f8b337b
parent24296efe62fd601dbff4ad92726d2fa6ded17e8c (diff)
downloadgsoc2013-empathy-0bd9b3a86a71b21a9acd215c59e0e8e9108704d5.tar
gsoc2013-empathy-0bd9b3a86a71b21a9acd215c59e0e8e9108704d5.tar.gz
gsoc2013-empathy-0bd9b3a86a71b21a9acd215c59e0e8e9108704d5.tar.bz2
gsoc2013-empathy-0bd9b3a86a71b21a9acd215c59e0e8e9108704d5.tar.lz
gsoc2013-empathy-0bd9b3a86a71b21a9acd215c59e0e8e9108704d5.tar.xz
gsoc2013-empathy-0bd9b3a86a71b21a9acd215c59e0e8e9108704d5.tar.zst
gsoc2013-empathy-0bd9b3a86a71b21a9acd215c59e0e8e9108704d5.zip
Implement Google OAUTH2 authentication for GOA accounts
GOA recently switched to OAuth2 for Google accounts, so we can use its credentials to access Google Talk without a password. https://bugzilla.gnome.org/show_bug.cgi?id=652546
-rw-r--r--libempathy/empathy-goa-auth-handler.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libempathy/empathy-goa-auth-handler.c b/libempathy/empathy-goa-auth-handler.c
index ddcde1775..49fc96270 100644
--- a/libempathy/empathy-goa-auth-handler.c
+++ b/libempathy/empathy-goa-auth-handler.c
@@ -182,6 +182,12 @@ got_oauth2_access_token_cb (GObject *source,
auth_cb, data);
break;
+ case EMPATHY_SASL_MECHANISM_GOOGLE:
+ empathy_sasl_auth_google_async (data->channel,
+ goa_account_get_identity (goa_object_peek_account (data->goa_object)),
+ access_token, auth_cb, data);
+ break;
+
default:
g_assert_not_reached ();
}
@@ -351,5 +357,6 @@ empathy_goa_auth_handler_supports (EmpathyGoaAuthHandler *self,
mech = empathy_sasl_channel_select_mechanism (channel);
return mech == EMPATHY_SASL_MECHANISM_FACEBOOK ||
- mech == EMPATHY_SASL_MECHANISM_WLM;
+ mech == EMPATHY_SASL_MECHANISM_WLM ||
+ mech == EMPATHY_SASL_MECHANISM_GOOGLE;
}