Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
chakri gangaraj
With out extension environment how to use custom LoginPostAction and AutoLo
8 gennaio 2008 20.25
Risposta

chakri gangaraj

Punteggio: Junior Member

Messaggi: 28

Data di Iscrizione: 13 novembre 2007

Messaggi recenti

Hi,

Now we are developing new project in Liferay 4.3.3.1.
Already we have a enterprise project, that we are converting to portlet project.

Our project contains custom login functionality. We are getting problem with integrating SSO into Liferay and also in our applciation.
I observed so many postings like this. I tried Authenticator, AutoLogin and also LoginPostAction.
My custom Authenticator is picked up by Liferay classloader, but there is no request object. So we are not able to set session variables specific to our application.
I tried LoginPostAction and also AutoLogin.

For our application we are not using extension environemnt. It contains seperate ear file.
So those classes not able to picked up by liferay. If custom LoginPostAction and AutoLogin are in liferay/web-inf/classes they are calling.
But I cant seperate my login functionality from my ear.

With out extension environment how to use custom LoginPostAction and AutoLogin.
I am waiting for reply.

Regards,
Chakri.
Ray Augé
Re: [Liferay Forums][Liferay English]With out extension environment how to
8 gennaio 2008 21.23
Risposta

Ray Augé

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1195

Data di Iscrizione: 7 febbraio 2005

Messaggi recenti

> Our project contains custom login functionality. We are getting problem with integrating SSO into Liferay and also in our applciation.
> I observed so many postings like this. I tried Authenticator, AutoLogin and also LoginPostAction.
> My custom Authenticator is picked up by Liferay classloader, but there is no request object. So we are not able to set session variables specific to our application.
> I tried LoginPostAction and also AutoLogin.
>
> For our application we are not using extension environemnt. It contains seperate ear file.
> So those classes not able to picked up by liferay. If custom LoginPostAction and AutoLogin are in liferay/web-inf/classes they are calling.
> But I cant seperate my login functionality from my ear.

I think the only way is to put your custom authentication,session
customizing code in a jar, placing that in a common classloader, making
it available to both your project ear and the portal.
chakri gangaraj
RE: Re: [Liferay Forums][Liferay English]With out extension environment ho
8 gennaio 2008 21.39
Risposta

chakri gangaraj

Punteggio: Junior Member

Messaggi: 28

Data di Iscrizione: 13 novembre 2007

Messaggi recenti

Hi Ray,

Thanx for ur quick reply.

My Custom authenticator is called by Liferay even though it is in my ear.

But same thing is not happening in case of LoginPostAction.

If I am not using Extension enviornment, how to set my own session objects after Liferay login.

Hoping for good suggestions.
Ray Augé
RE: Re: [Liferay Forums][Liferay English]With out extension environment ho
9 gennaio 2008 7.03
Risposta

Ray Augé

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1195

Data di Iscrizione: 7 febbraio 2005

Messaggi recenti

> My Custom authenticator is called by Liferay even though it is in my
> ear.
>
> But same thing is not happening in case of LoginPostAction.
>
> If I am not using Extension enviornment, how to set my own session
> objects after Liferay login.

The problem right now is that the EventsProcessor which handles all
types of portal events, expects objects extending
com.liferay.portal.struts.Action, which currently is defined in
portal-impl.jar (which is in the portal's classloader).

This means that when searching for your class, the context classloader
(the one that would find your class in your ear) would no longer see the
abstract class it extends (because that class is in the portal's
classloader) and so would throw an error on your class, thereby
rejecting it. (See com.liferay.portal.kernel.util.InstancePool
for exact details.)

What we'd need to do is extract this
(com.liferay.portal.struts.Action) from portal-impl and move it
out to portal-kernel making it globally accessible, so that external
applications can implement the abstract class and register event
handlers.

The reason you don't get this problem in the case of classes
implementing com.liferay.portal.security.auth.Authenticator is
because that interface is already located in portal-service.jar which is
available to the context classloader, such that when implementing
classes are resolved, the interface will be resolved in the same
classloader, and the class will be loaded properly.

Hope that explains it!
Ray Augé
RE: Re: [Liferay Forums][Liferay English]With out extension environment ho
9 gennaio 2008 11.41
Risposta

Ray Augé

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1195

Data di Iscrizione: 7 febbraio 2005

Messaggi recenti

You might be happy to see this:

http://support.liferay.com/browse/LEP-4727

After mentioning it to Brian Chan, he made the required change...
chakri gangaraj
RE: Re: [Liferay Forums][Liferay English]With out extension environment ho
9 gennaio 2008 20.43
Risposta

chakri gangaraj

Punteggio: Junior Member

Messaggi: 28

Data di Iscrizione: 13 novembre 2007

Messaggi recenti

Hi Ray,

I didn't expected this much quick response from u about solution.

Actually I am breaking my head for this.

After seeing ur reply become very happy.

Is there any standard way to customize liferay login page. Because my lgoin page contains some logo and look and feel.
chakri gangaraj
RE: Re: [Liferay Forums][Liferay English]With out extension environment ho
9 gennaio 2008 23.36
Risposta

chakri gangaraj

Punteggio: Junior Member

Messaggi: 28

Data di Iscrizione: 13 novembre 2007

Messaggi recenti

Hi Ray,

Thanks for help.

Now I am able to call my cusom Authenticator and also custom Login events.

I expected flow like this
CustomLoginPreAction --> CustomAuthenticator --> CustomLoginPostAction.

But actual flow is CustomAuthenticator --> CustomLoginPreAction --> CustomLoginPostAction.

Is it useful. Because before calling CustomAuthenticator it self I want to set some session objects.

In Authenticator - Map headerMap, Map parameterMap represents what?

Is it useful to get request or session parameters from headerMap or parameterMap.

Waiting for ur reply......
chakri gangaraj
RE: Re: [Liferay Forums][Liferay English]With out extension environment ho
11 gennaio 2008 1.41
Risposta

chakri gangaraj

Punteggio: Junior Member

Messaggi: 28

Data di Iscrizione: 13 novembre 2007

Messaggi recenti

Hi,

In login page if I set any request parameters, how to get those objects in my custom Authenticator class.

Is there any way to get request and session objects in custom Authenticator.
Michael Saechang
moved to Installation / Deployment / Setup
11 gennaio 2008 10.29
Risposta

Michael Saechang

LIFERAY STAFF

Punteggio: Liferay Master

Messaggi: 577

Data di Iscrizione: 19 novembre 2007

Messaggi recenti

moved to Installation / Deployment / Setup

-mike