Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 80352 invoked from network); 29 Dec 2009 20:20:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Dec 2009 20:20:13 -0000 Received: (qmail 35386 invoked by uid 500); 29 Dec 2009 20:20:12 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 35298 invoked by uid 500); 29 Dec 2009 20:20:12 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 35287 invoked by uid 99); 29 Dec 2009 20:20:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Dec 2009 20:20:12 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Dec 2009 20:20:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2474B23888BD; Tue, 29 Dec 2009 20:19:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r894475 - /tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java Date: Tue, 29 Dec 2009 20:19:45 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091229201945.2474B23888BD@eris.apache.org> Author: markt Date: Tue Dec 29 20:19:44 2009 New Revision: 894475 URL: http://svn.apache.org/viewvc?rev=894475&view=rev Log: Don't override method that has a more complete implementation (handles more edge cases) in RealmBase Modified: tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java Modified: tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java?rev=894475&r1=894474&r2=894475&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java (original) +++ tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java Tue Dec 29 20:19:44 2009 @@ -22,7 +22,6 @@ import java.io.File; import java.io.IOException; import java.security.Principal; -import java.util.ArrayList; import java.util.Map; import javax.security.auth.Subject; @@ -36,11 +35,7 @@ import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; -import org.apache.catalina.Context; import org.apache.catalina.authenticator.Constants; -import org.apache.catalina.connector.Request; -import org.apache.catalina.deploy.SecurityConstraint; -import org.apache.catalina.util.RequestUtil; import org.apache.tomcat.util.res.StringManager; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -210,56 +205,6 @@ /** - * Return the SecurityConstraints configured to guard the request URI for - * this request, or null if there is no such constraint. - * - * @param request Request we are processing - * @param context Context the Request is mapped to - */ - @Override - public SecurityConstraint [] findSecurityConstraints(Request request, - Context context) { - ArrayList results = null; - // Are there any defined security constraints? - SecurityConstraint constraints[] = context.findConstraints(); - if ((constraints == null) || (constraints.length == 0)) { - if (context.getLogger().isDebugEnabled()) - context.getLogger().debug(" No applicable constraints defined"); - return (null); - } - - // Check each defined security constraint - String uri = request.getDecodedRequestURI(); - String contextPath = request.getContextPath(); - if (contextPath.length() > 0) - uri = uri.substring(contextPath.length()); - uri = RequestUtil.URLDecode(uri); // Before checking constraints - String method = request.getMethod(); - for (int i = 0; i < constraints.length; i++) { - if (context.getLogger().isDebugEnabled()) - context.getLogger().debug(" Checking constraint '" + constraints[i] + - "' against " + method + " " + uri + " --> " + - constraints[i].included(uri, method)); - if (constraints[i].included(uri, method)) { - if(results == null) { - results = new ArrayList(); - } - results.add(constraints[i]); - } - } - - // No applicable security constraint was found - if (context.getLogger().isDebugEnabled()) - context.getLogger().debug(" No applicable constraint located"); - if(results == null) - return null; - SecurityConstraint [] array = new SecurityConstraint[results.size()]; - System.arraycopy(results.toArray(), 0, array, 0, array.length); - return array; - } - - - /** * Initialize this LoginModule with the specified * configuration information. * --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org