1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 10:19:41 +02:00

Add allowEmptyOrNullUsername()

to ConnectionConfiguration.Builder().

And prepare SASL EXTERNAL for empty or null usernames.

Also clarify some parts regarding the user field.

Fixes SMACK-627
This commit is contained in:
Florian Schmaus 2015-01-10 11:18:07 +01:00
parent 50c7d0bc2c
commit 7e4e3699a1
4 changed files with 33 additions and 5 deletions

View file

@ -20,7 +20,7 @@ import javax.security.auth.callback.CallbackHandler;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.sasl.SASLMechanism;
import org.jivesoftware.smack.util.StringUtils;
import org.jxmpp.util.XmppStringUtils;
/**
@ -39,7 +39,7 @@ public class SASLExternalMechanism extends SASLMechanism {
@Override
protected byte[] getAuthenticationText() throws SmackException {
if (authenticationId == null) {
if (StringUtils.isNullOrEmpty(authenticationId)) {
return null;
}