X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/af45cabf35fd1f8fa48038930a0a59d0ad121037..aae90eb1aa42a11449e30330e3e23e1e9e5eebb6:/src/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java diff --git a/src/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java b/src/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java index b817e724..b90c25e9 100644 --- a/src/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java +++ b/src/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java @@ -64,7 +64,6 @@ public class DetectAuthenticationMethodOperation extends RemoteOperation { } private Context mContext; - private String mWebDavUrl; /** * Constructor @@ -72,9 +71,8 @@ public class DetectAuthenticationMethodOperation extends RemoteOperation { * @param context Android context of the caller. * @param webdavUrl */ - public DetectAuthenticationMethodOperation(Context context, String webdavUrl) { + public DetectAuthenticationMethodOperation(Context context) { mContext = context; - mWebDavUrl = webdavUrl; } @@ -93,15 +91,15 @@ public class DetectAuthenticationMethodOperation extends RemoteOperation { AuthenticationMethod authMethod = AuthenticationMethod.UNKNOWN; RemoteOperation operation = new ExistenceCheckRemoteOperation("", mContext, false); - client.setWebdavUri(Uri.parse(mWebDavUrl)); - client.setBasicCredentials("", ""); + client.clearCredentials(); client.setFollowRedirects(false); // try to access the root folder, following redirections but not SAML SSO redirections result = operation.execute(client); String redirectedLocation = result.getRedirectedLocation(); - while (redirectedLocation != null && redirectedLocation.length() > 0 && !result.isIdPRedirection()) { - client.setWebdavUri(Uri.parse(result.getRedirectedLocation())); + while (redirectedLocation != null && redirectedLocation.length() > 0 && + !result.isIdPRedirection()) { + client.setBaseUri(Uri.parse(result.getRedirectedLocation())); result = operation.execute(client); redirectedLocation = result.getRedirectedLocation(); }