Merge pull request #1032 from nextcloud/nc12auth

HOTFIX: Ignore oauth for now and use always basic auth
This commit is contained in:
Tobias Kaminsky 2017-05-22 17:14:48 +02:00 committed by GitHub
commit 58b0592d44

View file

@ -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