org.jboss.web.tomcat.security
public class: CustomPrincipalValve [javadoc |
source]
java.lang.Object
org.apache.catalina.valves.ValveBase
org.jboss.web.tomcat.security.CustomPrincipalValve
Deprecated! this - should be removed now that the tomcat GenericPrincipal
supports a custom user principal.
A valve that associates the Principal as obtained from the authentication
layer with the request. This allows any custom principal established by
the authentication layer to be seen by the web app.
- author:
Scott.Stark - @jboss.org
- version:
$ - Revision: 43335 $
| Method from org.jboss.web.tomcat.security.CustomPrincipalValve Summary: |
|---|
|
invoke |
| Method from org.jboss.web.tomcat.security.CustomPrincipalValve Detail: |
public void invoke(Request request,
Response response) throws IOException, ServletException {
Principal user = request.getUserPrincipal();
if( user instanceof JBossGenericPrincipal )
{
// Restore the actual principal to the request
JBossGenericPrincipal guser = (JBossGenericPrincipal) user;
Principal realUser = guser.getCallerPrincipal();
request.setUserPrincipal(realUser);
}
getNext().invoke(request, response);
} Deprecated! |