掲示板

Liferay Custom Authentication Query

11年前 に Abhijit Shukla によって更新されました。

Liferay Custom Authentication Query

New Member 投稿: 13 参加年月日: 12/06/21 最新の投稿
Hi All,

I am trying to develop custom authentication. I have developed one JSP Login portlet. Login portlet is having email address , password field & submit button.
On Submitting this form I am calling "UserLocalServiceUtil.authenticateByEmailAddress" method. And this method is returning SUCCESS if user is present in Liferay database.

After authentication I am redirecting user to "/web/guest/home" page. The user is successfully redirecting to this page. But the user is still not logging to Liferay portal. On home page the Sign In link is still appearing. As per my understanding user should be able to login to Liferay portal , if Custom authentication is used.

Please let me know if I need to do any other configuration/code changes to achive this??
11年前 に Srikanth Konjarla によって更新されました。

RE: Liferay Custom Authentication Query

Junior Member 投稿: 51 参加年月日: 08/10/25 最新の投稿
Abhijit,

Authentication that is offered via user local service util does not perform "login". Login process is different in which it performs additional tasks after successful authentication to create a session etc. Based on your use case, you might want to consider extending the exiting login portlet, or use auto login hooks etc.
11年前 に Abhijit Shukla によって更新されました。

RE: Liferay Custom Authentication Query

New Member 投稿: 13 参加年月日: 12/06/21 最新の投稿
Hi Shrikanth,

Thanks for your valuable feedback. Could you please let me know if there is any example/source code available for this type of requirement ?
thumbnail
11年前 に Jitendra Rajput によって更新されました。

RE: Liferay Custom Authentication Query

Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
If you have source code then you can check LoginAction.java from that this LoginUtil.login() method is used to perform login.

Note : LoginUtil.java is part of Portal-impl.jar you can not directly use it into your plugin. I suggest try by creating hook to modify login portlet according to your requirement.