From 18c6d369d777a1d38ef450f868c22de1d0ebba2d Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 18 Dec 2011 20:25:44 +0100 Subject: More generic OAuth support now. Should work well for all GTalk accounts now and somewhat for MS Messenger. The fb part needs different parsing of the authorize request, and possibly some other work. --- protocols/jabber/jabber.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'protocols/jabber/jabber.c') diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 9b94b21d..bf849e2a 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -144,6 +144,13 @@ static void jabber_login( account_t *acc ) { jd->fd = jd->r_inpa = jd->w_inpa = -1; + if( strstr( jd->server, ".live.com" ) ) + jd->oauth2_service = &oauth2_service_mslive; + else if( strstr( jd->server, ".facebook.com" ) ) + jd->oauth2_service = &oauth2_service_facebook; + else + jd->oauth2_service = &oauth2_service_google; + /* For the first login with OAuth, we have to authenticate via the browser. For subsequent logins, exchange the refresh token for a valid access token (even though the last one maybe didn't expire yet). */ -- cgit v1.2.3