tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Bottner" <>
Subject RE: SingleSiteLogon working, now how do I log them out?
Date Fri, 06 Aug 2004 21:47:14 GMT
That was how I did handle it when I rolled my own security model through a
base action. But now that I am using Single Site Logon it sets a Principal
on the HttpServletRequest and I do not know how to invalidate the Principal.
In Tomcat you can actually retrieve the user name and password that was used
to log the user in through SingleSignOn using (BASIC, FORM, etc.) by doing a

import org.apache.catalina.realm.GenericPrincipal;

GenericPrincipal p = (GenericPrincipal)request.getUserPrincipal();
if ( p != null )
	String username = p.getName();
	String password = p.getPassword();

But this principal is now ATTACHED to the session and I can't seem to find a
way to invalidate it or remote it? It is stored deep down in the bowels for
Tomcat in something called their "notes" in CoyoteRequest which ends up
being wrapped by CoyoteRequestFacade which does not allow access.

Anyone else...

-----Original Message-----
From: Isen,Ciji [] 
Sent: Friday, August 06, 2004 4:39 PM
To: Tomcat Users List
Subject: Re: SingleSiteLogon working, now how do I log them out?

Well I suppose you are storing something in the session to store 
validation flag or you might be persisting a struts form object. Either way
you can just remove that object or just invalidate the session.
or session.invalidate()
Thats my take on your question.:-)

Gig 'em
Ciji Isen

Keith Bottner wrote:

>I have Single site logon working great with my application, however, I 
>am having a hard time trying to figure out how to log the user out when 
>they select log out.
>Have you ever noticed that the word 'complaint' and 'compliant' are 
>spelled almost the same except the transposition of a single letter. I 
>wonder why that is?

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message