Author: markt
Date: Mon Feb  6 20:31:23 2012
New Revision: 1241160

URL: http://svn.apache.org/viewvc?rev=1241160&view=rev
Log:
Remove a package dependency

Modified:
    tomcat/trunk/java/org/apache/catalina/Authenticator.java
    tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
    tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties
    tomcat/trunk/java/org/apache/catalina/connector/Request.java

Modified: tomcat/trunk/java/org/apache/catalina/Authenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Authenticator.java?rev=1241160&r1=1241159&r2=1241160&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/Authenticator.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Authenticator.java Mon Feb  6 
20:31:23 2012
@@ -38,6 +38,21 @@ import org.apache.catalina.deploy.LoginC
 public interface Authenticator {
 
     /**
+     * Authenticate the user making this request, based on the login
+     * configuration of the {@link Context} with which this Authenticator is
+     * associated.  Return <code>true</code> if any specified constraint has
+     * been satisfied, or <code>false</code> if we have created a response
+     * challenge already.
+     *
+     * @param request Request we are processing
+     * @param response Response we are populating
+     *
+     * @exception IOException if an input/output error occurs
+     */
+    public boolean authenticate(Request request, HttpServletResponse response)
+            throws IOException;
+
+    /**
      * Authenticate the user making this request, based on the specified
      * login configuration.  Return <code>true</code> if any specified
      * constraint has been satisfied, or <code>false</code> if we have
@@ -49,7 +64,12 @@ public interface Authenticator {
      *              should be performed
      *
      * @exception IOException if an input/output error occurs
+     *
+     * @deprecated  Use {@link #authenticate(Request, HttpServletResponse)}.
+     *              This will be removed / have reduced visibility in Tomcat
+     *              8.0.x
      */
+    @Deprecated
     public boolean authenticate(Request request, HttpServletResponse response,
             LoginConfig config) throws IOException;
 

Modified: 
tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java?rev=1241160&r1=1241159&r2=1241160&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
Mon Feb  6 20:31:23 2012
@@ -590,6 +590,27 @@ public abstract class AuthenticatorBase 
 
 
     /**
+     * Authenticate the user making this request, based on the login
+     * configuration of the {@link Context} with which this Authenticator is
+     * associated.  Return <code>true</code> if any specified constraint has
+     * been satisfied, or <code>false</code> if we have created a response
+     * challenge already.
+     *
+     * @param request Request we are processing
+     * @param response Response we are populating
+     *
+     * @exception IOException if an input/output error occurs
+     */
+    @Override
+    public boolean authenticate(Request request, HttpServletResponse response)
+            throws IOException {
+        if (context == null || context.getLoginConfig() == null) {
+            return true;
+        }
+        return authenticate(request, response, context.getLoginConfig());
+    }
+
+    /**
      * Authenticate the user making this request, based on the specified
      * login configuration.  Return <code>true</code> if any specified
      * constraint has been satisfied, or <code>false</code> if we have

Modified: 
tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties?rev=1241160&r1=1241159&r2=1241160&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties Mon 
Feb  6 20:31:23 2012
@@ -57,7 +57,6 @@ coyoteRequest.parseParameters=Exception 
 coyoteRequest.postTooLarge=Parameters were not parsed because the size of the 
posted data was too big. Use the maxPostSize attribute of the connector to 
resolve this if the application should accept large POSTs.
 coyoteRequest.chunkedPostTooLarge=Parameters were not parsed because the size 
of the posted data was too big. Because this request was a chunked request, it 
could not be processed further. Use the maxPostSize attribute of the connector 
to resolve this if the application should accept large POSTs.
 coyoteRequest.alreadyAuthenticated=This is request has already been 
authenticated
-coyoteRequest.noLoginConfig=No authentication mechanism has been configured 
for this context
 coyoteRequest.authenticate.ise=Cannot call authenticate() after the reponse 
has been committed
 coyoteRequest.uploadLocationInvalid=The temporary upload location [{0}] is not 
valid
 coyoteRequest.sessionEndAccessFail=Exception triggered ending access to 
session while recycling request

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1241160&r1=1241159&r2=1241160&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Mon Feb  6 
20:31:23 2012
@@ -71,7 +71,6 @@ import org.apache.catalina.Wrapper;
 import org.apache.catalina.core.ApplicationPart;
 import org.apache.catalina.core.ApplicationSessionCookieConfig;
 import org.apache.catalina.core.AsyncContextImpl;
-import org.apache.catalina.deploy.LoginConfig;
 import org.apache.catalina.util.ParameterMap;
 import org.apache.catalina.util.StringParser;
 import org.apache.coyote.ActionCode;
@@ -2395,13 +2394,7 @@ public class Request
                     sm.getString("coyoteRequest.authenticate.ise"));
         }
 
-        LoginConfig config = context.getLoginConfig();
-
-        if (config == null) {
-            throw new ServletException(
-                    sm.getString("coyoteRequest.noLoginConfig"));
-        }
-        return context.getAuthenticator().authenticate(this, response, config);
+        return context.getAuthenticator().authenticate(this, response);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to