tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Getting HttpRequest inside Realm/Tomcat 4
Date Wed, 24 Oct 2001 18:56:51 GMT


On Wed, 24 Oct 2001, Antony Bowesman wrote:

> Date: Wed, 24 Oct 2001 14:50:04 +0300
> From: Antony Bowesman <adb@teamware.com>
> Reply-To: tomcat-dev@jakarta.apache.org
> To: TomcatDev <tomcat-dev@jakarta.apache.org>
> Subject: Getting HttpRequest inside Realm/Tomcat 4
>
> Hi,
>
> I have a realm implementation that needs to access the HttpSession when
> a new successful authentication request is made.  (I need to hand off
> the session to a third party)
>
> How can I do this from within the realm.authenticate() method?  I've
> looked through the Container interface and can't find anything.
>

You're right ... there is nothing there to do this.  The original design
was based on the idea that Realm simply encapsulates a service that
authenticates a user, given a username and some credentials.  In addition,
it needs to work even when HTTP sessions are not in use (for example, for
BASIC authentication).

One strategy for dealing with this might be to register a session event
listener and registers your session in the sessionCreated() event handler.

> Rgds
> --
> Antony Bowesman
> Teamware Group
> adb@teamware.com
> phone: +358 9 5128 2562
> fax  : +358 9 5128 2705
>
> intra / extra / Internet solutions at www.teamware.com
>

Craig



Mime
View raw message