none
Logs of XMPP login to xmpp.messenger.live.com

    Frage

  • I have registered my app and have obtained the access token. Now i want to login the user into msn chat using my client. Can someone please share the logs of the authentication process??
    Mittwoch, 5. Oktober 2011 17:25

Antworten

  • Hi GoyalAmit,

    Here is a network trace for login.  There are four parts, separated by line breaks:

    • TLS Setup
    • SASL Auth
    • Binding to a resource and setting up a session
    • Roster fetch and initial presence

    Please let me know if you have any questions.

    Thanks,

    Casey

     

    [Sent]: <stream:stream to="messenger.live.com" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:stream from="messenger.live.com" version="1.0" id="4" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-MESSENGER-OAUTH2</mechanism></mechanisms></stream:features>
    [Sent]: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
    [Recv]: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />

    -----------Standard TLS handshake proceeds, post-TLS complete the flow continues-----------

    [Sent]: <stream:stream to="messenger.live.com" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:stream from="messenger.live.com" version="1.0" id="5" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-MESSENGER-OAUTH2</mechanism></mechanisms></stream:features>
    [Sent]: <auth mechanism="X-MESSENGER-OAUTH2" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">[OAUTH2 ACCESS TOKEN HERE]</auth>
    [Recv]: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />

    [Sent]: <stream:stream to="messenger.live.com" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:stream from="messenger.live.com" version="1.0" id="6" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></stream:features>
    [Sent]: <iq id="1" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /></iq>
    [Recv]: <iq id="1" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>[FULL JID HERE]</jid></bind></iq>
    [Sent]: <iq id="2" to="messenger.live.com" type="set"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
    [Recv]: <iq from="[FULL JID HERE]" id="2" type="result"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>

    [Sent]: <iq id="3" type="get"><query xmlns="jabber:iq:roster" /></iq>
    [Recv]: <iq id="3" to="[FULL JID HERE]" type="result"><query xmlns="jabber:iq:roster"><item jid="[BARE JID HERE]" name="[USER-READABLE NAME HERE]" subscription="both" /><item jid="[BARE JID HERE]" name="[USER-READABLE NAME HERE]" subscription="both" /></query></iq>
    [Sent]: <presence />
    [Recv]: <presence from="[FULL JID HERE]" to="[FULL JID HERE]"><show>chat</show><status>It's a dark, rainy night in October.  Time for some soccer!</status><x xmlns="vcard-temp:x:update"><photo>4cb57c98fe78954c45e474c76fdacb38a3250d60</photo></x></presence>
    [Recv]: <presence from="[FULL JID HERE]" to="[FULL JID HERE]"><show>xa</show><x xmlns="vcard-temp:x:update"><photo>291f616543ebb39904a7285a4faa342cced6e5e8</photo></x></presence> 

    Freitag, 7. Oktober 2011 22:37

Alle Antworten

  • Hi GoyalAmit,

    Here is a network trace for login.  There are four parts, separated by line breaks:

    • TLS Setup
    • SASL Auth
    • Binding to a resource and setting up a session
    • Roster fetch and initial presence

    Please let me know if you have any questions.

    Thanks,

    Casey

     

    [Sent]: <stream:stream to="messenger.live.com" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:stream from="messenger.live.com" version="1.0" id="4" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-MESSENGER-OAUTH2</mechanism></mechanisms></stream:features>
    [Sent]: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
    [Recv]: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />

    -----------Standard TLS handshake proceeds, post-TLS complete the flow continues-----------

    [Sent]: <stream:stream to="messenger.live.com" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:stream from="messenger.live.com" version="1.0" id="5" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-MESSENGER-OAUTH2</mechanism></mechanisms></stream:features>
    [Sent]: <auth mechanism="X-MESSENGER-OAUTH2" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">[OAUTH2 ACCESS TOKEN HERE]</auth>
    [Recv]: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />

    [Sent]: <stream:stream to="messenger.live.com" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:stream from="messenger.live.com" version="1.0" id="6" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
    [Recv]: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></stream:features>
    [Sent]: <iq id="1" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /></iq>
    [Recv]: <iq id="1" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>[FULL JID HERE]</jid></bind></iq>
    [Sent]: <iq id="2" to="messenger.live.com" type="set"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
    [Recv]: <iq from="[FULL JID HERE]" id="2" type="result"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>

    [Sent]: <iq id="3" type="get"><query xmlns="jabber:iq:roster" /></iq>
    [Recv]: <iq id="3" to="[FULL JID HERE]" type="result"><query xmlns="jabber:iq:roster"><item jid="[BARE JID HERE]" name="[USER-READABLE NAME HERE]" subscription="both" /><item jid="[BARE JID HERE]" name="[USER-READABLE NAME HERE]" subscription="both" /></query></iq>
    [Sent]: <presence />
    [Recv]: <presence from="[FULL JID HERE]" to="[FULL JID HERE]"><show>chat</show><status>It's a dark, rainy night in October.  Time for some soccer!</status><x xmlns="vcard-temp:x:update"><photo>4cb57c98fe78954c45e474c76fdacb38a3250d60</photo></x></presence>
    [Recv]: <presence from="[FULL JID HERE]" to="[FULL JID HERE]"><show>xa</show><x xmlns="vcard-temp:x:update"><photo>291f616543ebb39904a7285a4faa342cced6e5e8</photo></x></presence> 

    Freitag, 7. Oktober 2011 22:37
  • Hi Casey,

    Thanks a lot for providing me the detailed logs. They were really helpful. I would also like to know that which permissions do i need from the user while fetching the oauth2-access token so that i enable him to chat. I took 3 permissions: 1)wl.basic 2)wl.offline_access 3)wl.signin, but i am getting not-authorized failure. However with the same access token, I am able to fetch user details from the live's website making a call on this url: https://apis.live.net/v5.0/me?access_token= .

     

    Regards,

    Amit Goyal

    Dienstag, 18. Oktober 2011 10:40
  • Hi Casey,

    Thanks a lot for providing me the detailed logs. They were really helpful. I would also like to know that which permissions do i need from the user while fetching the oauth2-access token so that i enable him to chat. I took 3 permissions: 1)wl.basic 2)wl.offline_access 3)wl.signin, but i am getting not-authorized failure. However with the same access token, I am able to fetch user details from the live's website making a call on this url: https://apis.live.net/v5.0/me?access_token= .

     

    Regards,

    Amit Goyal

    You need to request wl.messenger
    Dienstag, 18. Oktober 2011 11:10
  • Thanks a lot. The reply was really helpful.
    Dienstag, 18. Oktober 2011 12:04
  • How did you do to obtain such info?

    I'm developing a php based webapp which is intended to get through Windows Live Messenger but I still couldn't make it work (n.B. I'm using the XMPPHP class.) I was wondering if you could tell me how to obtain a network trace from my webapp in order to compare it to the one you posted and find out what's going on.

    warm Regards,

     

    Diego.


    Diego at Pradouuu jajaja
    Freitag, 21. Oktober 2011 16:00