How to Get Current Request

"Rob Pratt" <rpratt-SsoaDR52fBi18SET+G6/[email protected]> Sat, 25 Jun 2005 16:01:31 -0700
Newsgroups gmane.comp.java.securityfilter.user
Message-ID <[email protected]>
Hello.

I want to get the current request object from inside my SecurityRealm
class, and after going through the SecurityFilter sources, I'm still
clueless. Can anyone give me a couple/few lines of code to do it? I've
gone through the list archives (and googled and googled and googled, and
I don't see anything related. (Sorry if I missed it.)

I'm using SecurityFilter with a Struts application, and I want to create
a messages object and save it in the request so I can read back error
messages on the login page if something goes wrong with authentication.
Here's a sketch of what I want to do:

public Principal authenticate(String username, String password) {
	if (booleanAuthenticate(username, password)) {
		return new SimplePrincipal(username);
	} else {=09
      	messagesObject.add("what.went.wrong");
		saveMessagesObjectInRequest();
      	return null;
	}
}

Ideas, anyone?

Thanks all who contribute to SecurityFilter! It works great!

=20
-----------------------
Regards,
Rob Pratt
rpratt-SsoaDR52fBi18SET+G6/[email protected]
Santa Cruz, Calif., USA



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click