mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-25 21:42:07 +01: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:
parent
1d83db898e
commit
c682091a47
2 changed files with 4 additions and 2 deletions
|
@ -532,7 +532,8 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean isAnonymous() {
|
public final boolean isAnonymous() {
|
||||||
return config.getUsername() == null && usedUsername == null;
|
return config.getUsername() == null && usedUsername == null
|
||||||
|
&& !config.allowNullOrEmptyUsername;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String serviceName;
|
private String serviceName;
|
||||||
|
|
|
@ -34,7 +34,8 @@ public class SASLExternalMechanism extends SASLMechanism {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void authenticateInternal(CallbackHandler cbh) throws SmackException {
|
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
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue