使用Liferay SDK进行登录身份验证

时间:2018-12-06 10:41:03

标签: android android-studio liferay liferay-6 liferay-7

我已经为我的项目设计了登录页面。我需要使用liferay sdk进行登录集成。我完全不了解如何在android中使用liferay sdk。请让我知道如何使用它。

谢谢

1 个答案:

答案 0 :(得分:0)

最好的学习方法是遵循README

这很容易,基本上是向liferay android SDK添加依赖项,创建配置对象并调用所需的远程服务(列在IP / api / jsonws下)

GroupService service = ServiceBuilder.build(GroupService.class);
Call<JSONArray> call = service.getUserSitesGroups();

Config config = new Config.Builder("http://_YOUR_IP_:8080")
  .auth(new BasicAuthentication("test@liferay.com", "test"))
  .build();

JSONArray groups = call.execute(config);