After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652574 - Add Chat account type
Add Chat account type
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks: 652543
 
 
Reported: 2011-06-14 15:21 UTC by Bastien Nocera
Modified: 2012-10-06 23:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add Chat account type (4.92 KB, patch)
2011-06-14 15:21 UTC, Bastien Nocera
reviewed Details | Review
Add Chat account type (5.14 KB, patch)
2011-06-23 19:12 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2011-06-14 15:21:20 UTC
.
Comment 1 Bastien Nocera 2011-06-14 15:21:22 UTC
Created attachment 189917 [details] [review]
Add Chat account type

And implement it in the Google backend
Comment 2 David Zeuthen (not reading bugmail) 2011-06-14 15:41:32 UTC
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?
Comment 3 Bastien Nocera 2011-06-23 19:12:25 UTC
Created attachment 190530 [details] [review]
Add Chat account type

And implement it in the Google backend
Comment 4 Bastien Nocera 2011-06-23 19:18:52 UTC
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?
Comment 5 David Zeuthen (not reading bugmail) 2011-06-23 19:54:17 UTC
(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).
Comment 6 Bastien Nocera 2011-06-23 20:08:06 UTC
Pushed!

Attachment 190530 [details] pushed as 851c46d - Add Chat account type
Comment 7 Danielle Madeley 2011-06-24 05:49:44 UTC
(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).