Use moodle authentication in a external application.

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Maduranga Siriwardena
Use moodle authentication in a external application.

I want to get the authentication from moodle (say the moodle site from our university) in my android application. I tried to make a http post request from my application with username and password.

But when I execute the post request, I get an exception. This is what I have tried

private URI url = new URI("");
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("username", "user"));
nameValuePairs.add(new BasicNameValuePair("password", "password"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
InputStream is = entity.getContent();

Please someone help me.

Average of ratings: -
Picture of Maduranga Siriwardena
Re: Use moodle authentication in a external application.

The exception what I get is No peer certificate

Average of ratings: -