Fórumok

How to use LDAP to our own custom login screen(portlet) than default one.

thumbnail
Vinod Kumar, módosítva 11 év-val korábban

How to use LDAP to our own custom login screen(portlet) than default one.

Junior Member Bejegyzések: 58 Csatlakozás dátuma: 2012.07.13. Legújabb bejegyzések
I have setup & configured LDAP using Apache Directory Studio. On the other hand (Liferay Portal 6.1), using its Control Panel->Portal Settings->Authentication->LDAP, I have given all the correct information like enabled LDAP checkbox, provided correct port no. on which the LDAP server is running, Base DN, etc . Liferay can successfully listen to LDAP also and can work with my LDAP users using Liferay Portal Default Login Screen(out of box provided by the framework).

Now my question is, we have done all these from GUI(i.e. at Control panel level of Liferay) so it is working. But now I have created a new custom page. I have also created and added my own custom Portlet on this page. This custom portlet is nothing but a very basic Login Page, showing a login screen with username and password and a submit button. Now what I want is my newly created custom login screen to behave and work same as that of default login screen provided out of box by Liferay. Means I want to integrate same LDAP to my custom login portlet, autheticate it and proceed. Please tell me how to achieve it. What all the liferay classes I need to work at code level. I don't know whether it can be done from Control Panel or not(I believe no from GUI) and also want to keep the session of that user after its authentication.
I would really appreciate your help.

Thanks a lot in advance.
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: How to use LDAP to our own custom login screen(portlet) than default on

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Just replicate the authentication logic in the original sign in portlet and you'll automatically have the right thing.
thumbnail
Vinod Kumar, módosítva 11 év-val korábban

RE: How to use LDAP to our own custom login screen(portlet) than default on

Junior Member Bejegyzések: 58 Csatlakozás dátuma: 2012.07.13. Legújabb bejegyzések
I'm sorry, I didn't get you. I'm new to Liferay. Could you please elaborate?
Thanks
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: How to use LDAP to our own custom login screen(portlet) than default on

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Download the Liferay source. In there you'll find the JSP pages for the login portlet which presents a form similar to what you've done. Those JSP pages invoke certain methods in the java code to log in and authenticate a user.

You will need to replicate all of this stuff in your own implementation.

For being new to Liferay, probably one of the last things you should be doing is creating your own Login portlet. Login is a tightly coupled portlet in the Liferay world and must be done correctly.
thumbnail
Vinod Kumar, módosítva 11 év-val korábban

RE: How to use LDAP to our own custom login screen(portlet) than default on

Junior Member Bejegyzések: 58 Csatlakozás dátuma: 2012.07.13. Legújabb bejegyzések
David H Nebinger:
Download the Liferay source. In there you'll find the JSP pages for the login portlet which presents a form similar to what you've done. Those JSP pages invoke certain methods in the java code to log in and authenticate a user.

You will need to replicate all of this stuff in your own implementation.

For being new to Liferay, probably one of the last things you should be doing is creating your own Login portlet. Login is a tightly coupled portlet in the Liferay world and must be done correctly.


Thanks for your advice...emoticon