login submit url (j_security_check, /logMeIn) is configurable, setAuthMethod() and...
authordayash <dayash>
Sat, 18 Jan 2003 07:19:54 +0000 (07:19 +0000)
committerdayash <dayash>
Sat, 18 Jan 2003 07:19:54 +0000 (07:19 +0000)
src/share/org/securityfilter/config/SecurityConfig.java

index 9281f38..72aa6de 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/config/SecurityConfig.java,v 1.7 2003/01/06 00:17:25 maxcooper Exp $
- * $Revision: 1.7 $
- * $Date: 2003/01/06 00:17:25 $
+ * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/config/SecurityConfig.java,v 1.8 2003/01/18 07:19:54 dayash Exp $
+ * $Revision: 1.8 $
+ * $Date: 2003/01/18 07:19:54 $
  *
  * ====================================================================
  * The SecurityFilter Software License, Version 1.1
@@ -72,7 +72,8 @@ import java.util.List;
  *
  * @author Torgeir Veimo (torgeir@pobox.com)
  * @author Max Cooper (max@maxcooper.com)
- * @version $Revision: 1.7 $ $Date: 2003/01/06 00:17:25 $
+ * @author Daya Sharma (iamdaya@yahoo.com, billydaya@sbcglobal.net)
+ * @version $Revision: 1.8 $ $Date: 2003/01/18 07:19:54 $
  */
 public class SecurityConfig {
 
@@ -83,6 +84,7 @@ public class SecurityConfig {
    private SecurityRealmInterface realm = null;
    private Object lastRealm = null;
    private boolean validating;
+       private String authMethod;
 
    /**
     * Constructor that takes the validating flag and debug level to be used while parsing.
@@ -142,6 +144,19 @@ public class SecurityConfig {
       this.defaultPage = defaultPage;
    }
 
+       public String getAuthMethod() {
+           return authMethod;
+       }
+
+       /**
+        * Set the authentication method being used to challenge the user. As of now only BASIC and FORM based are supported.
+        *
+        * @param authMethod The authentication method to be used by the filter
+        */
+       public void setAuthMethod(String authMethod) {
+           this.authMethod = authMethod;
+       }
+
    /**
     * Return the realm to use for authentication. This is the outer-most realm if nested realms are used.
     * The outer-most realm must be listed first in the configuration file.
@@ -220,6 +235,7 @@ public class SecurityConfig {
       digester.addSetNext("securityfilter-config/realm", "addRealm", "java.lang.Object");
 
       // login and error pages
+         digester.addCallMethod("securityfilter-config/login-config/auth-method", "setAuthMethod", 0);
       digester.addCallMethod("securityfilter-config/login-config/form-login-config/form-login-page", "setLoginPage", 0);
       digester.addCallMethod("securityfilter-config/login-config/form-login-config/form-error-page", "setErrorPage", 0);
       digester.addCallMethod("securityfilter-config/login-config/form-login-config/form-default-page", "setDefaultPage", 0);