\r
package com.owncloud.android.authentication;\r
\r
-import java.net.URLDecoder;\r
-\r
import android.accounts.Account;\r
import android.accounts.AccountManager;\r
import android.app.AlertDialog;\r
import android.widget.EditText;\r
import android.widget.TextView;\r
import android.widget.TextView.OnEditorActionListener;\r
-import android.widget.Toast;\r
\r
import com.actionbarsherlock.app.SherlockDialogFragment;\r
import com.owncloud.android.Log_OC;\r
mAuthCheckOperation = new ExistenceCheckOperation("", this, false);\r
WebdavClient client = OwnCloudClientUtils.createOwnCloudClient(Uri.parse(mHostBaseUrl + webdav_path), this, false);\r
mOperationThread = mAuthCheckOperation.execute(client, this, mHandler);\r
+ \r
}\r
\r
/**\r
// NOTHING TO DO ; can't find out what situation that leads to the exception in this code, but user logs signal that it happens\r
}\r
\r
- if (result.isTemporalRedirection() || result.isIdPRedirection()) {\r
+ if (result.isTemporalRedirection() && result.isIdPRedirection()) {\r
String url = result.getRedirectedLocation();\r
String targetUrl = mHostBaseUrl + AccountUtils.getWebdavPath(mDiscoveredVersion, mCurrentAuthTokenType);\r
\r
mSamlDialog = SamlWebViewDialog.newInstance(url, targetUrl); \r
mSamlDialog.show(getSupportFragmentManager(), TAG_SAML_DIALOG);\r
\r
- mAuthStatusIcon = android.R.drawable.ic_secure;\r
- mAuthStatusText = R.string.auth_follow_auth_server;\r
+ mAuthStatusIcon = 0;\r
+ mAuthStatusText = 0;\r
\r
} else {\r
mAuthStatusIcon = R.drawable.common_error;\r
showAuthStatus();\r
Log_OC.d(TAG, "Access failed: " + result.getLogMessage());\r
}\r
+\r
}\r
\r
\r
response.putString(AccountManager.KEY_AUTHTOKEN, mAuthToken);\r
// the next line is necessary; by now, notifications are calling directly to the AuthenticatorActivity to update, without AccountManager intervention\r
mAccountMgr.setAuthToken(mAccount, mCurrentAuthTokenType, mAuthToken);\r
- Log_OC.e(TAG, "saving auth token: " + mAuthToken);\r
\r
} else {\r
response.putString(AccountManager.KEY_AUTHTOKEN, mPasswordInput.getText().toString());\r
intent.putExtra(AccountManager.KEY_USERDATA, username);\r
if (isOAuth || isSaml) {\r
mAccountMgr.setAuthToken(mAccount, mCurrentAuthTokenType, mAuthToken);\r
- Log_OC.e(TAG, "saving auth token: " + mAuthToken);\r
}\r
/// add user data to the new account; TODO probably can be done in the last parameter addAccountExplicitly, or in KEY_USERDATA\r
mAccountMgr.setUserData(mAccount, AccountAuthenticator.KEY_OC_VERSION, mDiscoveredVersion.toString());\r
finish();\r
}\r
}\r
+\r
\r
}\r
\r
// TODO - show fail\r
Log_OC.d(TAG, "SSO failed");\r
}\r
- }\r
\r
+ }\r
\r
/** Show auth_message \r
* \r