Skip to content

Commit

Permalink
Merge pull request #1032 from nextcloud/nc12auth
Browse files Browse the repository at this point in the history
HOTFIX: Ignore oauth for now and use always basic auth
  • Loading branch information
tobiasKaminsky authored May 22, 2017
2 parents 9bc5d1b + d17af1d commit 58b0592
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@ protected RemoteOperationResult run(OwnCloudClient client) {
// 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

Expand Down

0 comments on commit 58b0592

Please sign in to comment.