Use clientlogin API module

This is the first step to allowing 2 factor authentication #328.
This uses the new API module clientlogin instead of the login module.

We still report the same set of errors in a 'nice' way with real
error messages, how ever there are lots more that can probably be
handled, for example #507.
This commit is contained in:
addshore 2017-05-12 13:04:22 +02:00
parent 2e7aaddafb
commit d38dde0ec4
12 changed files with 80 additions and 23 deletions

View file

@ -6,8 +6,8 @@ import android.content.Intent;
import android.os.AsyncTask;
import android.support.v7.app.AlertDialog;
import fr.free.nrw.commons.MWApi;
import org.mediawiki.api.ApiResult;
import org.mediawiki.api.MWApi;
import java.io.IOException;
import java.util.ArrayList;

View file

@ -13,8 +13,8 @@ import android.support.v4.app.NotificationCompat;
import android.webkit.MimeTypeMap;
import android.widget.Toast;
import fr.free.nrw.commons.*;
import org.mediawiki.api.ApiResult;
import org.mediawiki.api.MWApi;
import java.io.FileNotFoundException;
import java.io.IOException;
@ -25,11 +25,6 @@ import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import fr.free.nrw.commons.CommonsApplication;
import fr.free.nrw.commons.EventLog;
import fr.free.nrw.commons.HandlerService;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.contributions.Contribution;
import fr.free.nrw.commons.contributions.ContributionsActivity;
import fr.free.nrw.commons.contributions.ContributionsContentProvider;