public final class AuthenticationException extends StreamNegotiationException
An exception thrown during the login process, if SASL negotiation with the XMPP server fails.
Typical error cases are invalid username and/or password in which case the failure condition is Failure.Condition.NOT_AUTHORIZED
.
If you want to know the exact failure case, ask for the condition as shown below:
catch (AuthenticationException e) {
if (e.getCondition() == Failure.Condition.NOT_AUTHORIZED) {
//...
}
}
Constructor and Description |
---|
AuthenticationException(java.lang.String message) |
AuthenticationException(java.lang.String message,
Failure failure) |
Modifier and Type | Method and Description |
---|---|
Failure.Condition |
getCondition()
The specific SASL error condition.
|
public AuthenticationException(java.lang.String message)
public AuthenticationException(java.lang.String message, Failure failure)
public Failure.Condition getCondition()
The specific SASL error condition.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.