Foren

Portal login using custom login portlet

Peter Remec, geändert vor 8 Jahren.

Portal login using custom login portlet

New Member Beiträge: 20 Beitrittsdatum: 15.12.15 Neueste Beiträge
I created a JSF portlet that I try to use as a login portlet. I did user authentication using UserLocalServiceUtil (finished successful) and redirect to a start page, but the user is still not logged in. I also made a redirection using parameter autologin (/c/portal/login?parameterAutoLoginLogin=USER&parameterAutoLoginPassword=PASSWORD) , but still no luck. I guess I have to call LoginUtil.login method to actually do the login.

What is the cleanest way to do a login through my custom login portlet? I need to have a costum login portlet available beside (not instead of) the default one, provided by Liferay.
thumbnail
Neil Griffin, geändert vor 8 Jahren.

RE: Portal login using custom login portlet

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
If you are using Tomcat, then please download and deploy jsf2-login-portlet-4.2.5-ga6.war (JSF 2.2) or jsf2-login-portlet-3.2.5-ga5.war (JSF 2.1) and try one of them in your environment. Let us know if that works for you. Thanks.
Peter Remec, geändert vor 8 Jahren.

RE: Portal login using custom login portlet

New Member Beiträge: 20 Beitrittsdatum: 15.12.15 Neueste Beiträge
Neil Griffin:
If you are using Tomcat, then please download and deploy jsf2-login-portlet-4.2.5-ga6.war (JSF 2.2) or jsf2-login-portlet-3.2.5-ga5.war (JSF 2.1) and try one of them in your environment. Let us know if that works for you. Thanks.


Yes, JSF 2.1 portlet works in my environment. Thank you for a sample!
thumbnail
Neil Griffin, geändert vor 8 Jahren.

RE: Portal login using custom login portlet

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Thanks for reporting back with the good results. emoticon

You can find the source code at GitHub.
Peter Remec, geändert vor 8 Jahren.

RE: Portal login using custom login portlet

New Member Beiträge: 20 Beitrittsdatum: 15.12.15 Neueste Beiträge
Neil Griffin:
Thanks for reporting back with the good results. emoticon

You can find the source code at GitHub.


Already did, thanks!
Shiva Krishna Goud, geändert vor 8 Jahren.

RE: Portal login using custom login portlet

Regular Member Beiträge: 110 Beitrittsdatum: 02.01.15 Neueste Beiträge
Peter Remec:
I created a JSF portlet that I try to use as a login portlet. I did user authentication using UserLocalServiceUtil (finished successful) and redirect to a start page, but the user is still not logged in. I also made a redirection using parameter autologin (/c/portal/login?parameterAutoLoginLogin=USER&parameterAutoLoginPassword=PASSWORD) , but still no luck. I guess I have to call LoginUtil.login method to actually do the login.

What is the cleanest way to do a login through my custom login portlet? I need to have a costum login portlet available beside (not instead of) the default one, provided by Liferay.



Hi
find the sample sigin in plugin portlet in the following location download and deploy.


https://github.com/liferay/liferay-plugins/tree/6.2.x/portlets/sample-sign-in-portlet