Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Dhruv Pal
Custom login from sdk plugin portlet
31 gennaio 2013 2.45
Risposta

Dhruv Pal

Punteggio: Junior Member

Messaggi: 82

Data di Iscrizione: 23 gennaio 2013

Messaggi recenti

Hi all,

Please guide me as I want to custom login portlet (as i want to implement my own login portlet) but in back end i want liferay to do authentication task and after authentication redirect me to a particular page.
Jignesh Vachhani
RE: Custom login from sdk plugin portlet
31 gennaio 2013 4.01
Risposta

Jignesh Vachhani

Punteggio: Liferay Master

Messaggi: 780

Data di Iscrizione: 10 marzo 2008

Messaggi recenti

Why do you want to create own seprate plugin ? Is there any specific reason ?
If you want to make little bit logic and GUI changes then you can extend existing portlet itself.
So what kind of modification you wan to do here ? please put details which might help to get more elaboration.
Jitendra Rajput
RE: Custom login from sdk plugin portlet
31 gennaio 2013 4.09
Risposta

Jitendra Rajput

Punteggio: Liferay Master

Messaggi: 709

Data di Iscrizione: 7 gennaio 2011

Messaggi recenti

As suggested by jignesh .. if there is any GUI changes or same extension to existing login portlet then you can achieve this by creating hook or ext.
It wont be that easy to replicate login portlet because login portlet uses some classes of portal-impl (e.g LoginUtil) that you can can nt access from your portlet plugin.
Dhruv Pal
RE: Custom login from sdk plugin portlet
31 gennaio 2013 5.21
Risposta

Dhruv Pal

Punteggio: Junior Member

Messaggi: 82

Data di Iscrizione: 23 gennaio 2013

Messaggi recenti

Hi

Thanks for reply

I am creating login portlet in which i have already created login page i need that when user logins with username and password liferay authenticates that user itself means, i need that liferay performs all authentication back end processes but i should be able to use my custom login look up and after login they redirect to a particular page..

I came to know that LoginUtil has some methods that can solve my purpose ,but i am not able to extend or use that class.And i am new to liferay i don't know how to use ext environment,basically i dont want to use ext environment as i am new to this.

So please help me in this..
Kinshuk Gupta
RE: Custom login from sdk plugin portlet
31 gennaio 2013 5.50
Risposta

Kinshuk Gupta

Punteggio: New Member

Messaggi: 10

Data di Iscrizione: 2 gennaio 2013

Messaggi recenti

Are you creating the users in the Liferay _user table or you are maintaining them in a different Db ?
Dhruv Pal
RE: Custom login from sdk plugin portlet
31 gennaio 2013 5.59
Risposta

Dhruv Pal

Punteggio: Junior Member

Messaggi: 82

Data di Iscrizione: 23 gennaio 2013

Messaggi recenti

Basically i want liferay to do all back end work so i am using Liferay _user table
Kinshuk Gupta
RE: Custom login from sdk plugin portlet
31 gennaio 2013 21.48
Risposta

Kinshuk Gupta

Punteggio: New Member

Messaggi: 10

Data di Iscrizione: 2 gennaio 2013

Messaggi recenti

Dhruv Pal:
Basically i want liferay to do all back end work so i am using Liferay _user table



I had a similar scenario. I created a login hook for overriding the login.jsp of the Liferay login portlet. I changed the look and feel of it and included the original login.jsp by doing this -

1<liferay-util:buffer var="html">
2    <liferay-util:include page="/html/portlet/login/login.portal.jsp" />
3</liferay-util:buffer>
4 <%=html %>


Note : the name of the login.jsp changes to login.portal.jsp if overriding it,

This way I got Liferay authentication mechanism to work on my custom login page. Hope, this helps you .

-cheers
Dhruv Pal
RE: Custom login from sdk plugin portlet
31 gennaio 2013 22.05
Risposta

Dhruv Pal

Punteggio: Junior Member

Messaggi: 82

Data di Iscrizione: 23 gennaio 2013

Messaggi recenti

Thanks ..

I tries this one but here the problem is when i click sign in following url
1
2http://localhost:8080/web/guest/what-we-do?p_p_id=58&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_58_struts_action=%2Flogin%2Flogin

appeares. No doubt it redirects em to proper sign in page,but cant url be short like
1
2http://localhost:8080/login..

something like that
Kinshuk Gupta
RE: Custom login from sdk plugin portlet
31 gennaio 2013 22.30
Risposta

Kinshuk Gupta

Punteggio: New Member

Messaggi: 10

Data di Iscrizione: 2 gennaio 2013

Messaggi recenti

Dhruv Pal:
Thanks ..

I tries this one but here the problem is when i click sign in following url
1
2http://localhost:8080/web/guest/what-we-do?p_p_id=58&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_58_struts_action=%2Flogin%2Flogin

appeares. No doubt it redirects em to proper sign in page,but cant url be short like
1
2http://localhost:8080/login..

something like that



For that you'll have to look into setting Friendly URL topic.
Dhruv Pal
RE: Custom login from sdk plugin portlet
31 gennaio 2013 22.58
Risposta

Dhruv Pal

Punteggio: Junior Member

Messaggi: 82

Data di Iscrizione: 23 gennaio 2013

Messaggi recenti

Thanks

But as i am already using hook to override default login view.jsp so please tell me how to achieve this ..
Dhruv Pal
RE: Custom login from sdk plugin portlet
1 febbraio 2013 6.26
Risposta

Dhruv Pal

Punteggio: Junior Member

Messaggi: 82

Data di Iscrizione: 23 gennaio 2013

Messaggi recenti

please let me know if there is any way around..?