mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 02:58:00 +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:
parent
8dcc226bb5
commit
fd8b232017
1 changed files with 3 additions and 13 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue