mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 11:07:57 +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 {
|
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
|
// Send the authentication to the server
|
||||||
getSASLAuthentication().send(stanza.toString());
|
getSASLAuthentication().send(new AuthMechanism(getName(), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void challengeReceived(String challenge) throws IOException {
|
public void challengeReceived(String challenge) throws IOException {
|
||||||
// Build the challenge response stanza encoding the response text
|
// Build the challenge response stanza encoding the response text
|
||||||
StringBuilder stanza = new StringBuilder();
|
// and send the authentication to the server
|
||||||
stanza.append("<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
|
getSASLAuthentication().send(new Response());
|
||||||
stanza.append("=");
|
|
||||||
stanza.append("</response>");
|
|
||||||
|
|
||||||
// Send the authentication to the server
|
|
||||||
getSASLAuthentication().send(stanza.toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue