tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject simple authentication question
Date Wed, 20 Feb 2013 21:20:42 GMT
Hi.
In relation to a couple of recent posts, I have a naive question :

In a servlet, to retrieve the authenticated user-id (if any), I use

String userName = request.getRemoteUser();

Now, suppose I wanted to create a servlet filter which (under certain conditions), would 
force the current request to be authenticated as user "someuser", how would I do that ?

I s'pose it would too much to ask that it would just be

request.setRemoteUser("someuser");

Mmm ?




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message