Authentication using digest mechanism

Hello,

I started with Smack API recently. It is very good in many ways.

I tried using Authentication class with digest mechanism.

I am able to send an Authentication Packet as follows.

xmppConnection = new XMPPConnection(“server”);

xmppConnection.addPacketListener(this, null);

Authentication authentication = new Authentication();

authentication.setUsername(“user”);

authentication.setPassword(“password”);

authentication.setDigest(xmppConnection.getConnectionID(), “password”);

xmppConnection.sendPacket(authentication);

In processPacket event I am receiving an Authentication packet back from the server. The packet is received with an Error “406”. Where as I was hoping to see xmppConnection.isAuthenticated() to be true.

I simply want to send an authentication request using the Digest mechanism and log into the server. Am I doing something wrong above?

Thanks!

The #login methods on the XMPPConnection handle all of this for you.

Alex

However I would like to login over non-SASL connection using digest authentication. Do login methods support digest authentication?