[Bug 289154] msn and xmpp

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Mon Dec 19 23:35:12 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=289154


Daniele E. Domenichelli <daniele.domenichelli at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniele.domenichelli at gmail.
                   |                            |com




--- Comment #5 from Daniele E. Domenichelli <daniele domenichelli gmail com>  2011-12-19 23:35:12 ---
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

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the KDE-Telepathy mailing list