Author: remy.maucherat(a)jboss.com
Date: 2013-09-02 09:43:41 -0400 (Mon, 02 Sep 2013)
New Revision: 2254
Modified:
branches/7.2.x/src/main/java/org/apache/catalina/deploy/LoginConfig.java
Log:
BZ 1001641: Although auth method is supposed to be required, the schema says it is
optional, so use BASIC as a default.
Modified: branches/7.2.x/src/main/java/org/apache/catalina/deploy/LoginConfig.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/catalina/deploy/LoginConfig.java 2013-08-23
15:46:54 UTC (rev 2253)
+++ branches/7.2.x/src/main/java/org/apache/catalina/deploy/LoginConfig.java 2013-09-02
13:43:41 UTC (rev 2254)
@@ -20,9 +20,12 @@
import org.apache.catalina.util.RequestUtil;
+
import java.io.Serializable;
+import javax.servlet.http.HttpServletRequest;
+
/**
* Representation of a login configuration element for a web application,
* as represented in a <code><login-config></code> element in
the
@@ -82,7 +85,11 @@
}
public void setAuthMethod(String authMethod) {
- this.authMethod = authMethod;
+ if (authMethod == null) {
+ this.authMethod = HttpServletRequest.BASIC_AUTH;
+ } else {
+ this.authMethod = authMethod;
+ }
}