Subject: Problems with using X_MESSENGER_OAUTH2
I am trying to connect to windows live messenger through my application on Windows phone.
I've implemented the following method as suggested:
There is a break point in the method xmppClient_OnBeforeSasl and the debugger never stops on this point. Also I get "Unknown To Jid in the open stream stanza" in the response from the server so I suppose that it doesn't use Sasl mechanism.
This is the initial request sent to the messenger server:
<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="xmpp.messenger.live.com" version="1.0" >
I've implemented the following method as suggested:
XmppClient.OnBeforeSasl += xmppClient_OnBeforeSasl;
private void xmppClient_OnBeforeSasl(object sender, SaslEventArgs e)
{
e.Auto = false;
e.SaslMechanism = SaslMechanism.X_MESSENGER_OAUTH2;
e.SaslProperties = new LiveMessengerProperties
{
AccessToken = AccessToken
};
}
private void xmppClient_OnBeforeSasl(object sender, SaslEventArgs e)
{
e.Auto = false;
e.SaslMechanism = SaslMechanism.X_MESSENGER_OAUTH2;
e.SaslProperties = new LiveMessengerProperties
{
AccessToken = AccessToken
};
}
There is a break point in the method xmppClient_OnBeforeSasl and the debugger never stops on this point. Also I get "Unknown To Jid in the open stream stanza" in the response from the server so I suppose that it doesn't use Sasl mechanism.
This is the initial request sent to the messenger server:
<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="xmpp.messenger.live.com" version="1.0" >