1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-27 00:32:07 +01:00

SMACK-264: Fix SASL Anonymous for updated API.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11257 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Günther Niess 2009-09-09 11:26:44 +00:00 committed by niess
parent 8dcc226bb5
commit fd8b232017

View file

@ -48,24 +48,14 @@ public class SASLAnonymous extends SASLMechanism {
}
protected void authenticate() throws IOException {
StringBuilder stanza = new StringBuilder();
stanza.append("<auth mechanism=\"").append(getName());
stanza.append("\" xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
stanza.append("</auth>");
// Send the authentication to the server
getSASLAuthentication().send(stanza.toString());
getSASLAuthentication().send(new AuthMechanism(getName(), null));
}
public void challengeReceived(String challenge) throws IOException {
// Build the challenge response stanza encoding the response text
StringBuilder stanza = new StringBuilder();
stanza.append("<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
stanza.append("=");
stanza.append("</response>");
// Send the authentication to the server
getSASLAuthentication().send(stanza.toString());
// and send the authentication to the server
getSASLAuthentication().send(new Response());
}