Foros de discusión

Custom Login Portlet

Develloper Missing, modificado hace 11 años.

Custom Login Portlet

New Member Mensajes: 3 Fecha de incorporación: 18/11/12 Mensajes recientes
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, modificado hace 11 años.

RE: Custom Login Portlet

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
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, modificado hace 11 años.

RE: Custom Login Portlet

Liferay Master Mensajes: 550 Fecha de incorporación: 29/12/10 Mensajes recientes
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