You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/03/17 22:14:13 UTC
svn commit: r1667406 -
/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org