|
|
|
|
@ -134,15 +134,9 @@ private void connectAndLogin( SecurityAuthority authority,
|
|
|
|
|
|
|
|
|
|
// If the password hasn't been saved or the reason is one of those
|
|
|
|
|
// listed below we need to ask the user for credentials again.
|
|
|
|
|
//
|
|
|
|
|
// NOTE: We could check 'reason != CONNECTION_FAILED', but that's
|
|
|
|
|
// less clear and more easily broken if another reason is added
|
|
|
|
|
// (which is unlikely to require checking credentials again), so
|
|
|
|
|
// the performance impact of checking three values is preferred.
|
|
|
|
|
if ((password == null) ||
|
|
|
|
|
(authReasonCode == SecurityAuthority.AUTHENTICATION_REQUIRED) ||
|
|
|
|
|
(authReasonCode == SecurityAuthority.WRONG_PASSWORD) ||
|
|
|
|
|
(authReasonCode == SecurityAuthority.WRONG_USERNAME))
|
|
|
|
|
if (password == null
|
|
|
|
|
|| authReasonCode == SecurityAuthority.WRONG_PASSWORD
|
|
|
|
|
|| authReasonCode == SecurityAuthority.WRONG_USERNAME)
|
|
|
|
|
{
|
|
|
|
|
//create a default credentials object
|
|
|
|
|
UserCredentials credentials = new UserCredentials();
|
|
|
|
|
|