mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +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:
parent
50c7d0bc2c
commit
7e4e3699a1
4 changed files with 33 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue