powered by Jive Software

Login failed because of incorrect password?


Is there a way to know if a login attempt has failed specifically because of an incorrect username/password match so I can notify the user or will Smack always just generate an exception?

If yes, how?



Hello, I have found my answer. In case anyone finds it useful in the future connection.login() will not create an error if the wrong username or password is used; the error will occur when trying to communicate with the server e.g fetching the roster.

To notify the user of an incorrect password I have used connection.isAuthenticated() immediately after logging in.