Can't set http header 'auth_user' from Catalina Valve

C

Curtis Patrick

I'm attempting to support an existing cookie based authentication
system.

In essence, the user authenticates over a secure SSL connection. As
part of the authentication, a private cookie is added to the user's
browser session. The cookie is encrypted and contains the user's
network ID.

I've managed to write a very simple valve that can find the cookie,
decrypt it, and extract the user's network ID. Now I want to add that
netid to the header of the request so that my applications can use the
net-id of the user.

Unfortunately, I can't seem to add ANYTHING to the header.

Here is a snippet from my invoke(request,response,valveContext) method
....
org.apache.cataline.HttpRequest httpRequest =
(org.apache.cataline.HttpRequest)request;
httpRequest.addHeader("auth-user","testUserId");
....

I then have a simple SNOOP.JSP that shows all the headers.

Unfortunately, the "auth-user" header is not added.

I've included several println to track the progress and I know that
the call to addHeader() is not resulting in an error.

Any thoughts?

Thanks
Curtis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top