Bug 289154 - msn and xmpp
Summary: msn and xmpp
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: accounts-kcm (show other bugs)
Version: git-latest
Platform: OpenSUSE Linux
: NOR wishlist
Target Milestone: 0.4.0
Assignee: Telepathy Bugs
Depends on: 289668
  Show dependency treegraph
Reported: 2011-12-16 23:11 UTC by Alin M Elena
Modified: 2012-07-06 12:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Alin M Elena 2011-12-16 23:11:01 UTC
Version:           git-latest (using Devel) 
OS:                Linux

it seems msn came to their senses... and they support xmpp
Shall we have an account plugin for it?
at least I would like it.


Reproducible: Didn't try

Expected Results:  

OS: Linux (x86_64) release 3.1.0-2-desktop
Compiler: gcc
Comment 1 David Edmundson 2011-12-16 23:19:32 UTC
Auth handler needs updating in order to support this. 

Task 1) find out what auth type it uses
Task 2) implement it
Only then is it worth implementing
Comment 2 Alin M Elena 2011-12-16 23:26:49 UTC
that is probably answer to 1)
2) is for the braves

Comment 3 Alin M Elena 2011-12-17 21:45:54 UTC
so it seems empathy has this in work already

one of the bugs is already merged.

Comment 5 Daniele E. Domenichelli 2011-12-19 23:35:12 UTC
Some updates here: http://blogs.gnome.org/xclaesse/2011/12/19/updates-on-xmpp-support-in-msn/

I just chatted on #telepathy with xclaesse, here is the log:

[23:29:58] <drdanz> xclaesse: hi, just I read in your blog post that you integrated msn-xmpp in empathy
[23:30:26] <drdanz> can you give me some hints about how to do that?
[23:30:48] <drdanz> *in kde-telepathy
[23:31:50] <xclaesse> drdanz, does kde already have anything doing oauth2?
[23:33:07] <drdanz> we can connect to facebook accounts, but I believe we are doing it in the same way as for the "normal" xmpp accounts
[23:36:26] <drdanz> xclaesse: I'm trying to get an ofT.Channel.Type.ServerAuthentication, but I don't get any from gabble, therefore I'm not sure of what I shoud do...
[23:37:08] <xclaesse> drdanz, MS doc is here: http://msdn.microsoft.com/en-us/windowslive/hh561460
[23:38:16] <xclaesse> drdanz, basically what you need is display a web page that ask used the login/pass, and it will give you an authorization code, with that code you can make a request to get an access-token, and that access token has to be given to telepathy-gabble when loggin the account
[23:39:35] <xclaesse> drdanz, you need to create an account in MC, with param-account=messenger.live.com
[23:41:02] <xclaesse> drdanz, when gabble will try to connect that account, it will create a SeverAuthentification channel with mechanism X-MESSENGER-OAUTH2
[23:41:39] <drdanz> xclaesse: Ah ok, now I understand something more...  param-account=messenger.live.com is a special case?
[23:42:02] <xclaesse> messenger.live.com is their xmpp server
[23:42:41] <xclaesse> will, that's where gabble can make a SRV lookup to get the real server
[23:43:57] <xclaesse> drdanz, FYI the source code to get the access token is here: http://git.gnome.org/browse/gnome-online-accounts/tree/src/goabackend/goaoauth2provider.c and http://git.gnome.org/browse/gnome-online-accounts/tree/src/goabackend/goawindowsliveprovider.c
[23:44:15] <drdanz> xclaesse: thanks a lot!
[23:45:02] <drdanz> I *think* I can try to implement it now!
[23:45:08] <drdanz> thanks!
[23:45:45] <xclaesse> drdanz, once you did the part to get the access token, the telepathy part is there: http://git.gnome.org/browse/empathy/tree/libempathy/empathy-goa-auth-handler.c#n235
[23:46:04] <xclaesse> that's what you need to do in the ServerAuthentification handler
[23:48:04] <drdanz> Ok, that part should be easy, I'm more worried about the web page part :D
[23:48:42] <ocrete> drdanz: dont you have a webkit widget in Qt now anyway ?
[23:49:02] <xclaesse> drdanz, GOA uses webkit and librest
[23:49:10] <xclaesse> surely qt world as similar stuff
[23:49:46] <drdanz> We do, but I never used it, and I suck in gui stuff :D
[23:50:15] <xclaesse> don't worry, MS did the UI for you
[23:50:48] <xclaesse> the magic of web services, all you need is a QWindow with a QWebkit inside :p
[23:51:02] <drdanz> but I believe that choqok (microblog client) has something like that for twitter, so I might try to "steal" their code
[23:51:45] <xclaesse> should be similar
[23:52:03] <xclaesse> but twitter is oauth1 though, afaik (well, according to what I see in goa code)
[23:53:43] <drdanz> hmm we also have a QtOAuth library, that might be useful ;)
[23:54:15] <xclaesse> verify it does oauth2
[23:54:26] <xclaesse> it is sligthly different
[23:55:10] <drdanz> I will, thanks!
[23:57:37] <xclaesse> drdanz, if you want to test manually, open that in your browser: https://oauth.live.com/authorize?response_type=token&redirect_uri=https://oauth.live.com/desktop&client_id=0000000044067703&scope=wl.messenger
[00:00:24] <drdanz> xclaesse: thanks! That page uses empathy client id, doesn't it?
[00:00:45] <xclaesse> that's an app I created myself
[00:00:55] <xclaesse> you can make your own in dev.live.com
[00:01:51] <Hei_Ku`> jpwhitin`: good morning :)
[00:03:37] <xclaesse> drdanz, if you make your app, just make sure to let Redirect domain empty and Mobile client app=yes
Comment 6 Daniele E. Domenichelli 2011-12-28 11:47:50 UTC
Git commit 5e414c4e9c0c6b5dd9a05ba8ce2266a716aabef7 by Daniele E. Domenichelli.
Committed on 27/12/2011 at 17:39.
Pushed by ddomenichelli into branch 'master'.

Add .profile for msn using gabble and empty config dialog

A  +16   -0    data/profiles/msn-xmpp.profile
M  +3    -0    plugins/gabble/CMakeLists.txt
M  +4    -1    plugins/gabble/gabble-account-ui.cpp
A  +51   -0    plugins/gabble/main-options-widget-msn.cpp     [License: LGPL (v2.1+)]
A  +45   -0    plugins/gabble/main-options-widget-msn.h     [License: LGPL (v2.1+)]
A  +21   -0    plugins/gabble/main-options-widget-msn.ui