/* ownCloud Android client application\r
* Copyright (C) 2011 Bartek Przybylski\r
+ * Copyright (C) 2012-2013 ownCloud Inc.\r
*\r
* This program is free software: you can redistribute it and/or modify\r
* it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
+ * the Free Software Foundation, either version 2 of the License, or\r
* (at your option) any later version.\r
*\r
* This program is distributed in the hope that it will be useful,\r
\r
@Override\r
public int executeMethod(HostConfiguration hostconfig, final HttpMethod method, final HttpState state) throws IOException, HttpException {\r
- if (mCredentials instanceof BearerAuthScheme) {\r
+ if (mCredentials instanceof BearerCredentials) {\r
method.getHostAuthState().setAuthScheme(AuthPolicy.getAuthScheme(BearerAuthScheme.AUTH_POLICY));\r
+ method.getHostAuthState().setAuthAttempted(true);\r
}\r
return super.executeMethod(hostconfig, method, state);\r
}\r