From 4f0dd59921e7116067cd0058112b655cd46e4f53 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Thu, 26 Jun 2014 10:26:05 +0200 Subject: [PATCH] Fixed bug in update of SAML2 token after expiration --- owncloud-android-library | 2 +- .../authentication/AuthenticatorActivity.java | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/owncloud-android-library b/owncloud-android-library index 6cedc03465..8080e4904d 160000 --- a/owncloud-android-library +++ b/owncloud-android-library @@ -1 +1 @@ -Subproject commit 6cedc03465bee985c95f5b0b3c5433c490d054b4 +Subproject commit 8080e4904de8f042fdff17691674e900607c66a8 diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index ce23dc62c5..bc0ab54e62 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -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());