Zimbra provides a nice way to create custom authentication methods. Many methods may have the need to chain to a built-in authentication method. These built-in methods are coded in the com.zimbra.cs.account.auth.AuthMechanism class.

It would be very useful if the static inner classes that extend AuthMechanism could be made fully public. This is almost the case, but there are a few methods that are not public, making it impossible to use the classes from a server extension plugin.

Here is a patch that would resolve this issue. Since the changes are relatively straightforward, I'm hoping that it can be incorporated into the next 8.0.x release. Please let me know if you have any questions or comments.

Thanks for your help!

Code:
diff -u AuthMechanism.java.orig AuthMechanism.java
--- AuthMechanism.java.orig	2013-08-18 11:16:54.000000000 -0700
+++ AuthMechanism.java	2013-09-19 13:37:59.114432339 -0700
@@ -184,7 +184,7 @@
      * ZimbraAuth
      */
     public static class ZimbraAuth extends AuthMechanism {
-        ZimbraAuth(AuthMech authMech) {
+        public ZimbraAuth(AuthMech authMech) {
             super(authMech);
         }

@@ -225,8 +225,8 @@
     /*
      * LdapAuth
      */
-    static class LdapAuth extends AuthMechanism {
-        LdapAuth(AuthMech authMech) {
+    public static class LdapAuth extends AuthMechanism {
+        public LdapAuth(AuthMech authMech) {
             super(authMech);
         }

@@ -243,8 +243,8 @@
     /*
      * Kerberos5Auth
      */
-    static class Kerberos5Auth extends AuthMechanism {
-        Kerberos5Auth(AuthMech authMech) {
+    public static class Kerberos5Auth extends AuthMechanism {
+        public Kerberos5Auth(AuthMech authMech) {
             super(authMech);
         }

@@ -274,14 +274,14 @@
     /*
      * CustomAuth
      */
-    static class CustomAuth extends AuthMechanism {
+    public static class CustomAuth extends AuthMechanism {
         private String authMechStr;  // value of the zimbraAuthMech attribute

         private String mHandlerName = "";
         private ZimbraCustomAuth mHandler;
         List<String> mArgs;

-        CustomAuth(AuthMech authMech, String authMechStr) {
+        public CustomAuth(AuthMech authMech, String authMechStr) {
             super(authMech);
             this.authMechStr = authMechStr;

@@ -364,7 +364,7 @@
         }
     }

-    static class QuotedStringParser {
+    public static class QuotedStringParser {
         private String mInput;

         //the parser flips between these two sets of delimiters