<string name="auth_wtf_reenter_URL">Unexpected state; please, enter the server URL again</string>
<string name="auth_expired_oauth_token_toast">Your authorization expired.\nPlease, authorize again</string>
<string name="auth_expired_basic_auth_toast">Please, enter the current password</string>
+ <string name="auth_connecting_auth_server">Connecting to authentication server…</string>
+ <string name="auth_follow_auth_server">Follow instructions above to get authenticated</string>
+ <string name="auth_unsupported_auth_method">The server does not support this authentication method</string>
<string name="crashlog_message">Application terminated unexpectedly. Would you like to submit a crash report?</string>
<string name="crashlog_send_report">Send report</string>
mAuthStatusIcon = R.drawable.progress_small;\r
mAuthStatusText = R.string.oauth_login_connection;\r
showAuthStatus();\r
+ \r
\r
// GET AUTHORIZATION request\r
//Uri uri = Uri.parse(getString(R.string.oauth2_url_endpoint_auth));\r
private void startSamlBasedFederatedSingleSignOnAuthorization() {\r
// be gentle with the user\r
mAuthStatusIcon = R.drawable.progress_small;\r
- mAuthStatusText = R.string.oauth_login_connection;\r
+ mAuthStatusText = R.string.auth_connecting_auth_server;\r
showAuthStatus();\r
+ showDialog(DIALOG_LOGIN_PROGRESS);\r
\r
/// get the path to the root folder through WebDAV from the version server\r
String webdav_path = AccountUtils.getWebdavPath(mDiscoveredVersion, mCurrentAuthTokenType);\r
\r
} else if (operation instanceof ExistenceCheckOperation) {\r
if (AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mCurrentAuthTokenType)) {\r
- if (result.isTemporalRedirection()) {\r
- String url = result.getRedirectedLocation();\r
- mWebViewClient.setTargetUrl(mHostBaseUrl + AccountUtils.getWebdavPath(mDiscoveredVersion, mCurrentAuthTokenType));\r
- mSsoWebView.loadUrl(url);\r
- }\r
+ onSamlBasedFederatedSingleSignOnAuthorizationStart(operation, result);\r
\r
} else {\r
onAuthorizationCheckFinish((ExistenceCheckOperation)operation, result);\r
}\r
}\r
}\r
+ \r
+ \r
+ private void onSamlBasedFederatedSingleSignOnAuthorizationStart(RemoteOperation operation, RemoteOperationResult result) {\r
+ try {\r
+ dismissDialog(DIALOG_LOGIN_PROGRESS);\r
+ } catch (IllegalArgumentException e) {\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()) {\r
+ String url = result.getRedirectedLocation();\r
+ mWebViewClient.setTargetUrl(mHostBaseUrl + AccountUtils.getWebdavPath(mDiscoveredVersion, mCurrentAuthTokenType));\r
+ mSsoWebView.loadUrl(url);\r
+ \r
+ mAuthStatusIcon = android.R.drawable.ic_secure;\r
+ mAuthStatusText = R.string.auth_follow_auth_server;\r
+ \r
+ } else {\r
+ mAuthStatusIcon = R.drawable.common_error;\r
+ mAuthStatusText = R.string.auth_unsupported_auth_method;\r
+ \r
+ }\r
+ showAuthStatus();\r
+ }\r
\r
\r
/**\r
public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) {
Log_OC.e(TAG, "onReceivedError : " + failingUrl);
}
-
+
/*
@Override
}
@Override
- public void onPageFinished (WebView view, String url) {
- Log_OC.e(TAG, "onPageFinished : " + url);
- }
-
- @Override
public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) {
Log_OC.e(TAG, "onReceivedSslError : " + error);
}
}
@Override
+ public void onPageFinished (WebView view, String url) {
+ Log_OC.e(TAG, "onPageFinished : " + url);
+ }
+
+ @Override
public WebResourceResponse shouldInterceptRequest (WebView view, String url) {
Log_OC.e(TAG, "shouldInterceptRequest : " + url);
return null;