-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -333,26 +333,28 @@ public class UserLoginTask extends AsyncTask<Void, Void, Boolean> { | |
@Override | ||
protected Boolean doInBackground(Void... params) { | ||
// TODO: attempt authentication against a network service. | ||
|
||
/* | ||
HttpClient client = HttpClientBuilder.create().build(); | ||
HttpPost post = new HttpPost("http://localhost:8080/api/login"); | ||
HttpPost post = new HttpPost("http://ham.sharath.pro/api/login"); | ||
// Create some NameValuePair for HttpPost parameters | ||
List<NameValuePair> arguments = new ArrayList<>(2); | ||
arguments.add(new BasicNameValuePair("username", mEmail)); | ||
arguments.add(new BasicNameValuePair("password", mPassword)); | ||
arguments.add(new BasicNameValuePair("username", "[email protected]")); | ||
arguments.add(new BasicNameValuePair("password", "password")); | ||
try { | ||
post.setEntity(new UrlEncodedFormEntity(arguments)); | ||
HttpResponse response = client.execute(post); | ||
if(response.toString().contains("200 OK")) { | ||
return true; | ||
} | ||
} | ||
} catch (IOException e) { | ||
return false; | ||
} | ||
return false; | ||
return false;*/ | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
|