Author: markt Date: Thu Feb 11 20:05:52 2016 New Revision: 1729883 URL: http://svn.apache.org/viewvc?rev=1729883&view=rev Log: Revert AuthenticatorBase changes made to support JASPIC integration
Modified: tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java tomcat/trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java tomcat/trunk/java/org/apache/catalina/authenticator/NonLoginAuthenticator.java tomcat/trunk/java/org/apache/catalina/authenticator/SSLAuthenticator.java tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java 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=1729883&r1=1729882&r2=1729883&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java Thu Feb 11 20:05:52 2016 @@ -669,12 +669,6 @@ public abstract class AuthenticatorBase } - @Override - public boolean authenticate(Request request, HttpServletResponse response) throws IOException { - return doAuthenticate(request, response); - } - - /** * Authenticate the user making this request, based on the login * configuration of the {@link Context} with which this Authenticator is @@ -687,11 +681,9 @@ public abstract class AuthenticatorBase * * @exception IOException if an input/output error occurs */ - protected boolean doAuthenticate(Request request, HttpServletResponse response) - throws IOException { - // Defaults to false in case sub-class doesn't implement this method. - return false; - } + @Override + public abstract boolean authenticate(Request request, + HttpServletResponse response) throws IOException; /** Modified: tomcat/trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java?rev=1729883&r1=1729882&r2=1729883&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java Thu Feb 11 20:05:52 2016 @@ -14,8 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + + package org.apache.catalina.authenticator; + import java.io.IOException; import java.nio.charset.StandardCharsets; import java.security.Principal; @@ -30,6 +33,8 @@ import org.apache.tomcat.util.buf.ByteCh import org.apache.tomcat.util.buf.MessageBytes; import org.apache.tomcat.util.codec.binary.Base64; + + /** * An <b>Authenticator</b> and <b>Valve</b> implementation of HTTP BASIC * Authentication, as outlined in RFC 2617: "HTTP Authentication: Basic @@ -38,14 +43,24 @@ import org.apache.tomcat.util.codec.bina * @author Craig R. McClanahan */ public class BasicAuthenticator extends AuthenticatorBase { - private static final Log log = LogFactory.getLog(BasicAuthenticator.class); // --------------------------------------------------------- Public Methods + /** + * 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 + * created a response challenge already. + * + * @param request Request we are processing + * @param response Response we are creating + * + * @exception IOException if an input/output error occurs + */ @Override - protected boolean doAuthenticate(Request request, HttpServletResponse response) + public boolean authenticate(Request request, HttpServletResponse response) throws IOException { if (checkForCachedAuthentication(request, response, true)) { Modified: tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java?rev=1729883&r1=1729882&r2=1729883&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java Thu Feb 11 20:05:52 2016 @@ -182,8 +182,19 @@ public class DigestAuthenticator extends // --------------------------------------------------------- Public Methods + /** + * 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 + * created a response challenge already. + * + * @param request Request we are processing + * @param response Response we are creating + * + * @exception IOException if an input/output error occurs + */ @Override - protected boolean doAuthenticate(Request request, HttpServletResponse response) + public boolean authenticate(Request request, HttpServletResponse response) throws IOException { // NOTE: We don't try to reauthenticate using any existing SSO session, Modified: tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java?rev=1729883&r1=1729882&r2=1729883&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java Thu Feb 11 20:05:52 2016 @@ -117,8 +117,20 @@ public class FormAuthenticator // --------------------------------------------------------- Public Methods + + /** + * 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 + * created a response challenge already. + * + * @param request Request we are processing + * @param response Response we are creating + * + * @exception IOException if an input/output error occurs + */ @Override - protected boolean doAuthenticate(Request request, HttpServletResponse response) + public boolean authenticate(Request request, HttpServletResponse response) throws IOException { if (checkForCachedAuthentication(request, response, true)) { Modified: tomcat/trunk/java/org/apache/catalina/authenticator/NonLoginAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/NonLoginAuthenticator.java?rev=1729883&r1=1729882&r2=1729883&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/authenticator/NonLoginAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/NonLoginAuthenticator.java Thu Feb 11 20:05:52 2016 @@ -74,7 +74,7 @@ public final class NonLoginAuthenticator * @exception IOException if an input/output error occurs */ @Override - protected boolean doAuthenticate(Request request, HttpServletResponse response) + public boolean authenticate(Request request, HttpServletResponse response) throws IOException { // Don't try and use SSO to authenticate since there is no auth Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SSLAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SSLAuthenticator.java?rev=1729883&r1=1729882&r2=1729883&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/authenticator/SSLAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/SSLAuthenticator.java Thu Feb 11 20:05:52 2016 @@ -35,8 +35,18 @@ public class SSLAuthenticator extends Au // --------------------------------------------------------- Public Methods + /** + * Authenticate the user by checking for the existence of a certificate + * chain, validating it against the trust manager for the connector and then + * validating the user's identity against the configured Realm. + * + * @param request Request we are processing + * @param response Response we are creating + * + * @exception IOException if an input/output error occurs + */ @Override - protected boolean doAuthenticate(Request request, HttpServletResponse response) + public boolean authenticate(Request request, HttpServletResponse response) throws IOException { // NOTE: We don't try to reauthenticate using any existing SSO session, Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java?rev=1729883&r1=1729882&r2=1729883&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java Thu Feb 11 20:05:52 2016 @@ -134,7 +134,7 @@ public class SpnegoAuthenticator extends @Override - protected boolean doAuthenticate(Request request, HttpServletResponse response) + public boolean authenticate(Request request, HttpServletResponse response) throws IOException { if (checkForCachedAuthentication(request, response, true)) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org