X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/7c9d9e7b3a56229f97cf1bf193f61d4aedd09806..a0efedc99d0421554b8f8e93ef631e54a4cb05cd:/src/eu/alefzero/webdav/WebdavClient.java diff --git a/src/eu/alefzero/webdav/WebdavClient.java b/src/eu/alefzero/webdav/WebdavClient.java index 320bc526..51209280 100644 --- a/src/eu/alefzero/webdav/WebdavClient.java +++ b/src/eu/alefzero/webdav/WebdavClient.java @@ -42,11 +42,12 @@ import org.apache.http.HttpStatus; import org.apache.http.params.CoreProtocolPNames; import com.owncloud.android.Log_OC; - -import com.owncloud.android.authentication.AccountAuthenticator; +import com.owncloud.android.MainApp; import com.owncloud.android.network.BearerAuthScheme; import com.owncloud.android.network.BearerCredentials; + + import android.net.Uri; public class WebdavClient extends HttpClient { @@ -72,7 +73,7 @@ public class WebdavClient extends HttpClient { getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1); mFollowRedirects = true; mSsoSessionCookie = null; - mAuthTokenType = AccountAuthenticator.AUTH_TOKEN_TYPE_PASSWORD; + mAuthTokenType = MainApp.getAuthTokenTypePass(); } public void setBearerCredentials(String accessToken) { @@ -85,7 +86,7 @@ public class WebdavClient extends HttpClient { mCredentials = new BearerCredentials(accessToken); getState().setCredentials(AuthScope.ANY, mCredentials); mSsoSessionCookie = null; - mAuthTokenType = AccountAuthenticator.AUTH_TOKEN_TYPE_ACCESS_TOKEN; + mAuthTokenType = MainApp.getAuthTokenTypeAccessToken(); } public void setBasicCredentials(String username, String password) { @@ -97,7 +98,7 @@ public class WebdavClient extends HttpClient { mCredentials = new UsernamePasswordCredentials(username, password); getState().setCredentials(AuthScope.ANY, mCredentials); mSsoSessionCookie = null; - mAuthTokenType = AccountAuthenticator.AUTH_TOKEN_TYPE_PASSWORD; + mAuthTokenType = MainApp.getAuthTokenTypePass(); } public void setSsoSessionCookie(String accessToken) { @@ -105,7 +106,7 @@ public class WebdavClient extends HttpClient { getParams().setCookiePolicy(CookiePolicy.IGNORE_COOKIES); mSsoSessionCookie = accessToken; mCredentials = null; - mAuthTokenType = AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE; + mAuthTokenType = MainApp.getAuthTokenTypeSamlSessionCookie(); }