1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-23 14:52:06 +01:00

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

View file

@ -73,6 +73,7 @@ public abstract class SASLMechanism {
* response to the server's challenge. * response to the server's challenge.
* *
* @param challenge a base64 encoded string representing the 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 { 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