On Wed, 24 Oct 2001, Antony Bowesman wrote:

> Date: Wed, 24 Oct 2001 14:50:04 +0300
> From: Antony Bowesman <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: TomcatDev <[EMAIL PROTECTED]>
> 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
> [EMAIL PROTECTED]
> phone: +358 9 5128 2562
> fax  : +358 9 5128 2705
>
> intra / extra / Internet solutions at www.teamware.com
>

Craig


Reply via email to