diff -urN ./src/java/org/apache/xmlrpc/AuthenticatedDemo.java ../new-xmlrpc-1.1/src/java/org/apache/xmlrpc/AuthenticatedDemo.java
--- ./src/java/org/apache/xmlrpc/AuthenticatedDemo.java	Thu Jan  1 01:00:00 1970
+++ ../new-xmlrpc-1.1/src/java/org/apache/xmlrpc/AuthenticatedDemo.java	Tue Dec 31 00:01:47 2002
@@ -0,0 +1,78 @@
+package org.apache.xmlrpc;
+
+import java.util.*;
+
+/**
+ * Demo for AuthenticatedHandler
+ * @see AuthenticatedHandler
+ * @author <a href="mailto:chubrilo@yahoo.com">Dejan Bosanac</a>
+ */
+public class AuthenticatedDemo implements AuthenticatedHandler
+{
+        /**
+         * Implements method of AuthenticatedHandler
+         * @see AuthenticatedHandler.authenticate
+         */
+        public boolean authenticate(String username, String password) {
+                if (username.equals("test") && password.equals("test"))
+                {
+                        return true;
+                }
+                else
+                {
+                        return false;
+                }
+        }
+
+        /**
+         * Demo method
+         */
+        public boolean test()
+        {
+                System.out.println("Testing");
+                return true;
+        }
+
+        /**
+         *
+         */
+        public static void main (String args[])
+        {
+        try
+        {
+            String url = args[0];
+            String method = args[1];
+            String username = args[2];
+            String password = args[3];
+            Vector v = new Vector();
+            for (int i = 4; i < args.length; i++)
+            {
+                try
+                {
+                    v.addElement(new Integer(Integer.parseInt(args[i])));
+                }
+                catch(NumberFormatException nfx)
+                {
+                    v.addElement(args[i]);
+                }
+            }
+            XmlRpcClient client = new XmlRpcClient(url);
+            try
+            {
+                client.setBasicAuthentication(username, password);
+                client.execute(method, v);
+            }
+            catch(Exception ex)
+            {
+                System.err.println("Error: " + ex.getMessage());
+            }
+        }
+        catch(Exception x)
+        {
+            System.err.println(x);
+            System.err.println("Usage: java org.apache.xmlrpc.XmlRpcClient "
+                    + "<url> <method> <arg> ....");
+            System.err.println("Arguments are sent as integers or strings.");
+        }
+        }
+}
\ No newline at end of file
diff -urN ./src/java/org/apache/xmlrpc/AuthenticatedHandler.java ../new-xmlrpc-1.1/src/java/org/apache/xmlrpc/AuthenticatedHandler.java
--- ./src/java/org/apache/xmlrpc/AuthenticatedHandler.java	Thu Jan  1 01:00:00 1970
+++ ../new-xmlrpc-1.1/src/java/org/apache/xmlrpc/AuthenticatedHandler.java	Mon Dec 30 23:56:11 2002
@@ -0,0 +1,14 @@
+package org.apache.xmlrpc;
+/**
+ * Interface describing authenticate handler that can execute any method
+ * @author <a href="mailto:chubrilo@yahoo.com">Dejan Bosanac</a>
+ */
+public interface AuthenticatedHandler {
+        /**
+         * Performs user specific authorisation
+         * @param String username
+         * @param String password
+         * @return boolean true if authentication is successful, false otherwise
+         */
+        public boolean authenticate(String username, String password);
+}
\ No newline at end of file
diff -urN ./src/java/org/apache/xmlrpc/WebServer.java ../new-xmlrpc-1.1/src/java/org/apache/xmlrpc/WebServer.java
--- ./src/java/org/apache/xmlrpc/WebServer.java	Wed Mar  6 20:43:48 2002
+++ ../new-xmlrpc-1.1/src/java/org/apache/xmlrpc/WebServer.java	Mon Dec 30 21:50:03 2002
@@ -122,6 +122,7 @@
             webserver.addHandler("string", "Welcome to XML-RPC!");
             webserver.addHandler("math", Math.class);
             webserver.addHandler("auth", new AuthDemo());
+            webserver.addHandler("authenticated", new AuthenticatedDemo());
             webserver.addHandler("$default", new Echo());
             // XmlRpcClients can be used as Proxies in XmlRpcServers which is a cool feature for applets.
             webserver.addHandler("mttf", new XmlRpcClient("http://www.mailtothefuture.com:80/RPC2"));
diff -urN ./src/java/org/apache/xmlrpc/XmlRpcServer.java ../new-xmlrpc-1.1/src/java/org/apache/xmlrpc/XmlRpcServer.java
--- ./src/java/org/apache/xmlrpc/XmlRpcServer.java	Wed Mar  6 20:43:48 2002
+++ ../new-xmlrpc-1.1/src/java/org/apache/xmlrpc/XmlRpcServer.java	Mon Dec 30 21:45:48 2002
@@ -100,7 +100,8 @@
     public void addHandler(String handlername, Object handler)
     {
         if (handler instanceof XmlRpcHandler ||
-                handler instanceof AuthenticatedXmlRpcHandler)
+                handler instanceof AuthenticatedXmlRpcHandler ||
+                handler instanceof AuthenticatedHandler)
         {
             handlers.put(handlername, handler);
         }
@@ -266,6 +267,18 @@
                     outParam =((AuthenticatedXmlRpcHandler) handler).
                             execute(methodName, inParams, user, password);
                 }
+                else if (handler instanceof AuthenticatedHandler)
+                {
+                        if (((AuthenticatedHandler)handler).authenticate(user, password))
+                        {
+                                Invoker invoker = new Invoker(handler);
+                                outParam = invoker.execute(methodName, inParams);
+                        }
+                        else
+                        {
+                                throw new XmlRpcException(0, "Username or password does not match");
+                        }
+                }
                 else
                 {
                     outParam =((XmlRpcHandler) handler).execute(
