Use the FQDN for SASL auth -- fixes GSSAPI (SMACK-224).

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@8272 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2007-05-10 21:45:26 +00:00 committed by matt
parent ac958c9971
commit bdc61a2db2
2 changed files with 5 additions and 2 deletions

View File

@ -188,8 +188,10 @@ public class SASLAuthentication implements UserAuthentication {
Constructor constructor = selected
.getConstructor(new Class[]{SASLAuthentication.class});
currentMechanism = (SASLMechanism) constructor.newInstance(new Object[]{this});
// Trigger SASL authentication with the selected mechanism
currentMechanism.authenticate(username, connection.getServiceName(), password);
// 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);
// Wait until SASL negotiation finishes
synchronized (this) {

View File

@ -73,6 +73,7 @@ public abstract class SASLMechanism {
* response to the server's challenge.
*
* @param challenge a base64 encoded string representing the challenge.
* @throws IOException if an exception sending the response occurs.
*/
public void challengeReceived(String challenge) throws IOException {
// Build the challenge response stanza encoding the response text