use of com.owncloud.android.lib.common.OwnCloudCredentials in project android by nextcloud.
the class AuthenticatorActivity method checkBasicAuthorization.
/**
* Tests the credentials entered by the user performing a check of existence on the root folder of the ownCloud
* server.
*/
private void checkBasicAuthorization(@Nullable String webViewUsername, @Nullable String webViewPassword) {
// be gentle with the user
IndeterminateProgressDialog dialog = IndeterminateProgressDialog.newInstance(R.string.auth_trying_to_login, true);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.add(dialog, WAIT_DIALOG_TAG);
ft.commitAllowingStateLoss();
// validate credentials accessing the root folder
OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(webViewUsername, webViewPassword);
accessRootFolder(credentials);
}
Aggregations