1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-20 09:37:58 +01:00

Use XMPP domain (and not hostname) for SASL. Confirm with Jay that we are not breaking other SASL mechanisms (DIGEST-MD5 works now)

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@10844 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2008-10-24 03:54:21 +00:00 committed by gato
parent c6d72f8b01
commit 2c93fc9e70

View file

@ -24,17 +24,11 @@ import org.jivesoftware.smack.filter.PacketIDFilter;
import org.jivesoftware.smack.packet.Bind;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Session;
import org.jivesoftware.smack.sasl.SASLMechanism;
import org.jivesoftware.smack.sasl.SASLAnonymous;
import org.jivesoftware.smack.sasl.SASLPlainMechanism;
import org.jivesoftware.smack.sasl.SASLCramMD5Mechanism;
import org.jivesoftware.smack.sasl.SASLDigestMD5Mechanism;
import org.jivesoftware.smack.sasl.SASLExternalMechanism;
import org.jivesoftware.smack.sasl.SASLGSSAPIMechanism;
import org.jivesoftware.smack.sasl.*;
import javax.security.auth.callback.CallbackHandler;
import java.io.IOException;
import java.lang.reflect.Constructor;
import javax.security.auth.callback.CallbackHandler;
import java.util.*;
/**
@ -311,7 +305,7 @@ public class SASLAuthentication implements UserAuthentication {
// Trigger SASL authentication with the selected mechanism. We use
// connection.getHost() since GSAPI requires the FQDN of the server, which
// may not match the XMPP domain.
currentMechanism.authenticate(username, connection.getHost(), password);
currentMechanism.authenticate(username, connection.getServiceName(), password);
// Wait until SASL negotiation finishes
synchronized (this) {