从moodle获取android应用程序的身份验证

从moodle获取android应用程序的身份验证,android,moodle,Android,Moodle,我想在我的android应用程序中从moodle(比如我们大学的moodle站点)获得认证。我没有访问数据库的权限。我尝试使用用户名和密码从我的应用程序发出http post请求 但是当我执行post请求时,我得到一个异常。这就是我尝试过的 private URI url = new URI("https://online.mrt.ac.lk/login/index.php"); HttpClient httpclient = new DefaultHttpClient(); HttpPost

我想在我的android应用程序中从moodle(比如我们大学的moodle站点)获得认证。我没有访问数据库的权限。我尝试使用用户名和密码从我的应用程序发出http post请求

但是当我执行post请求时,我得到一个异常。这就是我尝试过的

private URI url = new URI("https://online.mrt.ac.lk/login/index.php"); 
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();

请有人帮帮我。

每当你说你遇到异常时,请发布StackTrace。@J.Romero,我发布了生成的异常,但不是整个StackTrace。我想在我编辑帖子并添加例外之前,您可能已经看到了我的帖子。谢谢你的建议。你明白了吗?
javax.net.ssl.SSLPeerUnverifiedException: No peer certificate