From d17af1d37ecb5e967c3a3aa81757fa69a1291ddd Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 22 May 2017 17:09:05 +0200 Subject: [PATCH] ignore oauth for now and use always basic auth --- .../operations/DetectAuthenticationMethodOperation.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java b/src/main/java/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java index 3988516e66..7e56b3ac29 100644 --- a/src/main/java/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java +++ b/src/main/java/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java @@ -98,11 +98,8 @@ public class DetectAuthenticationMethodOperation extends RemoteOperation { // analyze response if (result.getHttpCode() == HttpStatus.SC_UNAUTHORIZED) { String authRequest = ((result.getAuthenticateHeader()).trim()).toLowerCase(); - if (authRequest.startsWith("basic")) { + if (authRequest.startsWith("basic") || authRequest.startsWith("bearer")) { authMethod = AuthenticationMethod.BASIC_HTTP_AUTH; - - } else if (authRequest.startsWith("bearer")) { - authMethod = AuthenticationMethod.BEARER_TOKEN; } // else - fall back to UNKNOWN