mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-23 06:42:05 +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:
parent
ac958c9971
commit
bdc61a2db2
2 changed files with 5 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue