GNOME Bugzilla – Bug 652574
Add Chat account type
Last modified: 2012-10-06 23:29:06 UTC
.
Created attachment 189917 [details] [review] Add Chat account type And implement it in the Google backend
Review of attachment 189917 [details] [review]: Generally looks fine but the question is authentication. There are a couple of options here - If GoogleTalk (somehow) supports OAuth 1.0 tokens, then everything is good - If GoogleTalk don't supports OAuth 1.0 then the Chat application (e.g. the Telepathy framework) needs to authenticate in another way, e.g. ask the user for his password and maintain that password in safe storage itself - We could also move the GOA Google backend to OAuth 2.0 but then we can't authenticate GMail IMAP and SMTP connections. But for this, Evolution could just ask the user for password and maintain the password in safe storage itself. Sooner or later GMail will grow OAuth 2.0 support - that's what the GMail team said, anyway. - However, the problem with moving the GOA Google backend to OAuth 2.0 is that we can't use anonymous API keys. Which means that we need to agree with (and therefore actually read and understand) the TOS otherwise we can't get the API keys at all. Specifically the TOS may say that the API keys must be kept private which is fundamentally incompatible with free software and what we are trying to do. I haven't read the TOS but I have asked requested the GNOME Foundation for legal help in doing so. If it wasn't for the TOS thing, I'd be leaning towards just switching to OAuth 2.0 immediately... We could probably commit the patch as is except for the get_credentials_generation() bump... that would at least make Telepathy/MissionControl integration easier, yes? I mean, we can always back it out if we can't get it to work since the GOA APIs are not declared as stable yet. And we probably want a .Chat service type _anyway_. ::: data/dbus-interfaces.xml @@ +353,3 @@ + <interface name="org.gnome.OnlineAccounts.Chat"> + </interface> + An account object implements this interface if it provides Like with the .Mail interface, we could have things like XmppSupported and pointers to what XMPP server to use (host, address, TLS enabled etc.). We can always add that later though... ::: doc/goa-docs.xml @@ +128,3 @@ <xi:include href="xml/GoaCalendar.xml"/> <xi:include href="xml/GoaContacts.xml"/> + <xi:include href="xml/GoaChat.xml"/> This is correct but is for the generated C code. You also want to add it in the 'Service Specific Interfaces' for the D-Bus interface. ::: src/goabackend/goagoogleprovider.c @@ +125,3 @@ get_credentials_generation (GoaProvider *provider) { + return 2; Hmm, we only need to increase this number if we actually add a new scope. Someone on IRC mentioned the OAuth 2 scope works with OAuth 1.0 ... at least for making "Chat" appear in the authentication dialog, no?
Created attachment 190530 [details] [review] Add Chat account type And implement it in the Google backend
Fixed the above niggles. I'll leave the discussion of ToS to the Foundation, and which specific auth to use for you to discuss with the Telepathy hackers. Filed bug 652543 about exporting more information. OK to commit?
(In reply to comment #4) > Fixed the above niggles. > > I'll leave the discussion of ToS to the Foundation, and which specific auth to > use for you to discuss with the Telepathy hackers. > > Filed bug 652543 about exporting more information. Sounds good, thanks. > OK to commit? Sure, looks good. If we don't end up using this for 3.2 (e.g. if Empathy / Telepathy ends up not using it), we can always just disable it. From what I gathered on IRC last week, it could be made to work in Empathy / Telepathy even if Google's XMPP servers don't accept the OAuth 1.0 token (by just asking the user for his password).
Pushed! Attachment 190530 [details] pushed as 851c46d - Add Chat account type
(In reply to comment #5) > From what I gathered on IRC last week, it could be made to work in Empathy / > Telepathy even if Google's XMPP servers don't accept the OAuth 1.0 token (by > just asking the user for his password). I'm just finishing this plugin which exposes accounts to Telepathy up now. With this, the user will be prompted for their password. Once we know how to do do an appropriate authentication method, we can then add the support for automatically doing the authentication (which is actually separate).