--- a/Plugins/Purple Service/AIPurpleGTalkAccountViewController.m Wed Apr 01 11:51:37 2015 +0200
+++ b/Plugins/Purple Service/AIPurpleGTalkAccountViewController.m Wed Apr 01 12:05:55 2015 +0200
@@ -18,6 +18,8 @@
+#import <Adium/AIAccountControllerProtocol.h> #define ADIUM_GTALK_CLIENT_ID @"853036734951.apps.googleusercontent.com"
#define ADIUM_GTALK_SECRET @"TSXNUaq34k_0YU7DZT4HbmQd"
@@ -123,6 +125,8 @@
NSDictionary *responseDict = [response objectFromJSONDataWithParseOptions:JKParseOptionNone error:&error];
AILogWithSignature(@"%@", responseDict);
+ [[adium accountController] setPassword:[responseDict objectForKey:@"access_token"] forAccount:account]; -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{
--- a/Plugins/Purple Service/libpurple_extensions/auth_gtalk.c Wed Apr 01 11:51:37 2015 +0200
+++ b/Plugins/Purple Service/libpurple_extensions/auth_gtalk.c Wed Apr 01 12:05:55 2015 +0200
@@ -31,17 +31,28 @@
-#define PACKAGE "pidgin"
gtalk_start(JabberStream *js, xmlnode *packet, xmlnode **response, char **error)
xmlnode *auth = xmlnode_new("auth");
xmlnode_set_namespace(auth, "urn:ietf:params:xml:ns:xmpp-sasl");
xmlnode_set_attrib(auth, "mechanism", "X-OAUTH2");
xmlnode_set_attrib(auth, "auth:service", "oauth2");
xmlnode_set_attrib(auth, "xmlns:auth", "http://www.google.com/talk/protocol/auth");
+ resp = g_string_new(""); + resp = g_string_append_c(resp, '\0'); + resp = g_string_append(resp, js->user->node); + resp = g_string_append_c(resp, '\0'); + resp = g_string_append(resp, purple_connection_get_password(js->gc)); + enc_out = purple_base64_encode((guchar *)resp->str, resp->len); + xmlnode_insert_data(auth, enc_out, -1); return JABBER_SASL_STATE_CONTINUE;