Author: markt Date: Tue Mar 17 21:14:12 2015 New Revision: 1667406 URL: http://svn.apache.org/r1667406 Log: Pull out connector authentication calls into a separate method.
Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1667406&r1=1667405&r2=1667406&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Tue Mar 17 21:14:12 2015 @@ -681,18 +681,6 @@ public class CoyoteAdapter implements Ad } } - // Set the remote principal - String principal = req.getRemoteUser().toString(); - if (principal != null) { - request.setUserPrincipal(new CoyotePrincipal(principal)); - } - - // Set the authorization type - String authtype = req.getAuthType().toString(); - if (authtype != null) { - request.setAuthType(authtype); - } - // Request mapping. MessageBytes serverName; if (connector.getUseIPVHosts()) { @@ -853,10 +841,27 @@ public class CoyoteAdapter implements Ad return false; } + doConnectorAuthentication(req, request); + return true; } + private void doConnectorAuthentication(org.apache.coyote.Request req, Request request) { + // Set the remote principal + String principal = req.getRemoteUser().toString(); + if (principal != null) { + request.setUserPrincipal(new CoyotePrincipal(principal)); + } + + // Set the authorization type + String authtype = req.getAuthType().toString(); + if (authtype != null) { + request.setAuthType(authtype); + } + } + + /** * Extract the path parameters from the request. This assumes parameters are * of the form /path;name=value;name2=value2/ etc. Currently only really --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org