Hello,
thanks for your help. I have now used this method call to manipulate the header
and it works:-))
request.getCoyoteRequest().getMimeHeaders().addValue("Authorization").setString("Basic
am9jaGVuYjpqb2NoZW5i");
Many thanks
Regards
Jochen
--
Mark is correct: request.addHeader has been deprecated in 5.5.x+, and
doesn't actually do anything at all. See Mark's response for the correct
way to add your own request header.
Alternatively, if the set the userPrincipal on the Request in your Valve,
then Tomcat won't bother to try and auth
Böhringer Jochen wrote:
> So I think the request object I modify does not reflect its changes to the
> CoyoteRequest the BasicAuthenticator reads the values from. Is there a
> solution to modify the CoyoteRequest?
Sounds like you are heading in the right direction. You can access the
headers via
>Again, put your valve in host, not context if you want it to be called
>before authentification
Sorry I misunderstood your hint. Now I have this configuration (with Valve and
Host element on the same level):
[...]
[...]
Now my valve is called before the response the authenticati
Böhringer Jochen wrote:
> But the problem is, that this valve is called after the basic authentication
> took place (exactly as it happens if I try to use a servlet filter).
If you explicitly define the Authenticator Valve as well as your own,
and specify your own first, you should get the behavi