public final class AuthenticationException extends StreamNegotiationException
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, use the instanceof operator as shown below:
catch (AuthenticationException e) {
if (e.getCondition() == Failure.Condition.NOT_AUTHORIZED) {
//...
}
}
| Constructor and Description |
|---|
AuthenticationException(String message) |
AuthenticationException(String message,
Failure failure) |
| Modifier and Type | Method and Description |
|---|---|
Failure.Condition |
getCondition()
The specific SASL error condition.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic AuthenticationException(String message)
public Failure.Condition getCondition()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.