1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-06-26 21:34:50 +02:00

Fix SASL EXTERNAL with client cert provided JID

isAnonymous() is now a bit weakened since it also considers
allowNullorEmptyUsername.

SaslExternalMechanism of smack-sasl-provided now also doesn't throw an
UnsupportedOperationException.

Follow up on 7e4e3699a1
This commit is contained in:
Florian Schmaus 2015-01-12 15:38:56 +01:00
parent 1d83db898e
commit c682091a47
2 changed files with 4 additions and 2 deletions

View file

@ -532,7 +532,8 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
@Override
public final boolean isAnonymous() {
return config.getUsername() == null && usedUsername == null;
return config.getUsername() == null && usedUsername == null
&& !config.allowNullOrEmptyUsername;
}
private String serviceName;

View file

@ -34,7 +34,8 @@ public class SASLExternalMechanism extends SASLMechanism {
@Override
protected void authenticateInternal(CallbackHandler cbh) throws SmackException {
throw new UnsupportedOperationException("CallbackHandler not (yet) supported");
// Do nothing. Auth will be done external to Smack and which will receive the localpart
// after the resource binding
}
@Override