You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Adam Klatzkin <Ad...@bentley.com> on 2001/05/01 15:14:20 UTC

RE: Accessing authentication info from a slide store

>  The WebDAV servlet doesn't reuse the SlideTokens, but nothing would
prevent you 
>  from doing so.
I meant to just store the parameters hashtable of the SlideToken in the
users session, not the SlideToken itself.  Doing this would provide state
across multiple requests.  

>  Just put the SlideToken into a session.
I would do that myself but I am not sure how to get my hands on the user
session managed by the J2EE container from within a store.  I could maintain
my own session for the user in a static data structure but all I have to key
off of are the credentials.  This doesn't really work well because the same
credentials could have multiple 'sessions'.

Proposal:
Maybe slide token should have a second constructor --
public SlideToken(CredentialsToken credentialsToken, Hashtable parameters)
{
this.credentialsToken = credentialsToken;
this.parameters = parameters;
}

line 276 (from 4/30 snapshot),
org.apache.slide.webdav.method.WebdavMethod.java
currently:
   this.slideToken = new SlideToken(this.credToken);

change to:
   Hashtable params =
(Hashtable)req.getSession().getValue("SlideTokenParameters");
   if (params == null)
      {
      params = new Hashtable();
      req.getSession().putValue("SlideTokenParameters", params);
      }
   this.slideToken = new SlideToken(this.credToken, params);

Of course, I am not very intimate with the Slide source so there may be
issues with this.  Thoughts??

My proposal suggests that state within the SlideToken be maintained at the
session level.  Of course there are also scenarios where state is desired at
only the request level which the SlideToken currently provides.  Maybe it
would be beneficial to provide both these options with the SlideToken
(addParameter(..), addSessionParameter(..), etc.).

Thanks,
Adam

-----Original Message-----
From: Remy Maucherat [mailto:remy@betaversion.org]
Sent: Monday, April 30, 2001 5:54 PM
To: slide-user@jakarta.apache.org
Subject: RE: Accessing authentication info from a slide store


Quoting Adam Klatzkin <Ad...@bentley.com>:

> Thank you for making these changes.  I've noticed though, that the
> state
> information maintained by the SlideToken does not persist across
> requests
> within a users session.  Would it be possible to actually store the
> SlideToken's parameters Hashtable within the users session so it is
> available on successive requests?  

The WebDAV servlet doesn't reuse the SlideTokens, but nothing would prevent
you 
from doing so.
Just put the SlideToken into a session.

We can consider doing the same in the WebDAV servlet. It could also be a 
workaround to the problem with IE and HEAD which was reported this weekend.

Remy