Foren

Custom Login Portlet

Develloper Missing, geändert vor 11 Jahren.

Custom Login Portlet

New Member Beiträge: 3 Beitrittsdatum: 18.11.12 Neueste Beiträge
Hi, I have created a portlet which take some inputs from user and send data on other server. Now I want to provide login option to user in same portlet. I mean there will be a check box and if user click on that check box, two input boxes will visible for email and password. I want to match email and password in my portlet but
I can't found any method in UserLocalService to retrieve user by email and password. I also tried to encrypt user's password but encrypt method in portal-impl emoticon


Thanks in advance.
thumbnail
David H Nebinger, geändert vor 11 Jahren.

RE: Custom Login Portlet

Liferay Legend Beiträge: 14918 Beitrittsdatum: 02.09.06 Neueste Beiträge
You should not validate email/password yourself.

Instead you should defer to the Liferay services to handle that.

Take a look at the default Liferay sign on portlet to see how to invoke Liferay to handle the login.
thumbnail
Amit Doshi, geändert vor 11 Jahren.

RE: Custom Login Portlet

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
Dev J:
Hi, I have created a portlet which take some inputs from user and send data on other server. Now I want to provide login option to user in same portlet. I mean there will be a check box and if user click on that check box, two input boxes will visible for email and password. I want to match email and password in my portlet but
I can't found any method in UserLocalService to retrieve user by email and password. I also tried to encrypt user's password but encrypt method in portal-impl emoticon


Thanks in advance.

In order to authenticate refer the method UserLocalServiceUtil.authenticateForBasic(long companyId, java.lang.String authType, java.lang.String login, java.lang.String password)

Company id---> themeDisplay.getCompanyId().
authType----> emailAddress,userId,screenName (Use any one according to your requirement).
login- that you entered on the textbox
password- that you entered on the password textbox,

Hope it will be useful.

Thanks & Regards,
Amit Doshi