Fixed bug in update of SAML2 token after expiration

This commit is contained in:
David A. Velasco 2014-06-26 10:26:05 +02:00
parent bbfef4ff45
commit 4f0dd59921
2 changed files with 13 additions and 2 deletions

@ -1 +1 @@
Subproject commit 6cedc03465bee985c95f5b0b3c5433c490d054b4
Subproject commit 8080e4904de8f042fdff17691674e900607c66a8

View file

@ -62,6 +62,9 @@ import com.actionbarsherlock.app.SherlockDialogFragment;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.SsoWebViewClient.SsoWebViewClientListener;
import com.owncloud.android.lib.common.OwnCloudAccount;
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
import com.owncloud.android.lib.common.OwnCloudCredentialsFactory;
import com.owncloud.android.lib.common.accounts.AccountTypeUtils;
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants;
import com.owncloud.android.operations.DetectAuthenticationMethodOperation.AuthenticationMethod;
@ -941,7 +944,15 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
if (!mUsernameInput.getText().toString().equals(username)) {
// fail - not a new account, but an existing one; disallow
result = new RemoteOperationResult(ResultCode.ACCOUNT_NOT_THE_SAME);
result = new RemoteOperationResult(ResultCode.ACCOUNT_NOT_THE_SAME);
/*
OwnCloudClientManagerFactory.getDefaultSingleton().removeClientFor(
new OwnCloudAccount(
Uri.parse(mServerInfo.mBaseUrl),
OwnCloudCredentialsFactory.newSamlSsoCredentials(mAuthToken))
);
*/
mAuthToken = "";
updateAuthStatusIconAndText(result);
showAuthStatus();
Log_OC.d(TAG, result.getLogMessage());