WebSphere Portal Server - Extend LogoutUserAuth

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > April 2005 > Extend LogoutUserAuth





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Extend LogoutUserAuth
Vincent

2004-07-03, 7:06 pm

Hi,

I extend the WPS default logout class as below in order to remove all
cookies from HTTP headers. Which properties I need to configure to get it
work. I mean let WPS invoke
my class instead of default one

Thanks

package com.pt;

import javax.servlet.http.*;

import com.ibm.portal.WpsException;
import com.ibm.wps.engine.RunData;



public class LogoutUserAuth extends
com.ibm.wps.engine.commands.LogoutUserAuth {

protected void doPostLogout (RunData aRunData) throws WpsException
{
Cookie all[]=aRunData.getRequest().getCookies();
int cookieCount=all.length;
if (cookieCount>=0){
HttpServletResponse res=aRunData.getResponse();
for (int i=0;i<cookieCount;i++){
Cookie curCookie=all[i];
System.out.print(curCookie.getDomain());
curCookie.setMaxAge(0);
res.addCookie(curCookie);

}
}
super.doPostLogout(aRunData);
}

}



Oliver Meyer

2004-07-03, 7:06 pm

Vincent,
have a look at this link:

http://www-1.ibm.com/support/docvie...tf-8&lang=en+en


Oliver
Bryon Kataoka

2004-07-03, 7:06 pm

Would you know how to set this up so I can test in WSAD? Do I need
security enabled?

So far I have updated the ConfigServices and LoaderServices in
C:\Program Files\IBM\WebSphere
Studio\runtimes\portal_v50\shared\app\co
nfig\services

I put my qualidfied class file in C:\Program Files\IBM\WebSphere
Studio\runtimes\portal_v50\shared\app

I run a test but never see a system out that I have in the code.

Thanks



Oliver Meyer wrote:
> Vincent,
> have a look at this link:
>
> http://www-1.ibm.com/support/docvie...tf-8&lang=en+en
>
>
>
> Oliver


Vincent

2004-07-16, 7:54 am

I also follow the same step. But it doesn't work, either.
Did you get it work on non-developing environment?

"Bryon Kataoka" <bkataoka@commercesolutions.com> ???
news:cc49au$b4vs$1@news.boulder.ibm.com ???...
> Would you know how to set this up so I can test in WSAD? Do I need
> security enabled?
>
> So far I have updated the ConfigServices and LoaderServices in
> C:\Program Files\IBM\WebSphere
> Studio\runtimes\portal_v50\shared\app\co
nfig\services
>
> I put my qualidfied class file in C:\Program Files\IBM\WebSphere
> Studio\runtimes\portal_v50\shared\app
>
> I run a test but never see a system out that I have in the code.
>
> Thanks
>
>
>
> Oliver Meyer wrote:
http://www-1.ibm.com/support/docvie...tf-8&lang=en+en[vbcol=seagreen]
>



Brian Lalor

2004-07-21, 5:59 pm

Bryon Kataoka wrote:
> Would you know how to set this up so I can test in WSAD? Do I need
> security enabled?
>
> So far I have updated the ConfigServices and LoaderServices in
> C:\Program Files\IBM\WebSphere
> Studio\runtimes\portal_v50\shared\app\co
nfig\services
>
> I put my qualidfied class file in C:\Program Files\IBM\WebSphere
> Studio\runtimes\portal_v50\shared\app
>
> I run a test but never see a system out that I have in the code.


I'm not using WSAD, but I found that I had to explicitly add the JAR
containing my custom command to
/path/to/AppServer/config/cells/<cell>/nodes/<node>/libraries.xml. Add
something like
<classPath>${WPS_HOME}/shared/app/MyJar.jar</classPath>
as the last <classPath/> element in the WPSlib element.

I think that if you don't have security enabled, portal will only work
with LogoutUserNoAuth; you can test your methods by extending the
....NoAuth class instead of the ...Auth class. That's what I found today
trying to extend LoginUser.
kdevos

2004-07-27, 8:16 am

quote:
Originally posted by Brian Lalor
Bryon Kataoka wrote:[vbcol=seagreen]
> Would you know how to set this up so I can test in WSAD? Do I need
> security enabled?



Hi,

I'm also trying to extend the loginUserNoAuth, but I think it only works with loginUserAuth and security enabled, I did several tests but never manged to extend userLoginNoAuth and get it working
Oliver Meyer

2004-07-27, 6:02 pm

Not true! I just tried to do this without security enabled.
I created a class LoginUserNoAuth that derives from
com.ibm.wps.engine.commands.LoginUserAuth.
I put System.outs in doPreLogin(...) and doAuthenticate(...).
Both System.outs are written to the log file, therefore my classes are
invoked.
I put my classes to <PortalServer>/shared/app/<myPathName> directory.
I also modified LoaderService.properties to look for my command package.
Then I restarted portal server, and this works for me.

Oliver
kdevos

2004-07-28, 8:09 am

quote:
Originally posted by Oliver Meyer
Not true! I just tried to do this without security enabled.
I created a class LoginUserNoAuth that derives from
com.ibm.wps.engine.commands.LoginUserAuth.
I put System.outs in doPreLogin(...) and doAuthenticate(...).
Both System.outs are written to the log file, therefore my classes are
invoked.
I put my classes to <PortalServer>/shared/app/<myPathName> directory.
I also modified LoaderService.properties to look for my command package.
Then I restarted portal server, and this works for me.

Oliver



Sorry what I meant was you can indeed subclass com.ibm.wps.engine.commands.LoginUserAuth but i never managed to subclass com.ibm.wps.engine.commands.LoginUserNoAuth and get it working

2005-04-06, 2:56 am

Hi,
I want to extend the LogoutUserAuth ...
How will i do this ..?
For com.ibm.portal.WpsException ...wht jar i need to add ?
From where will i get that jar?
I want the step by step information.Please let me know.

Thanx
kalyani

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com