updated manifold API to support the move to SSL for the backend
[unfold.git] / manifold / manifoldapi.py
index 042e127..f23ba20 100644 (file)
@@ -20,13 +20,13 @@ class ManifoldAPI:
 
     def __init__(self, auth=None, cainfo=None):
         
-        config = Config()
         self.auth = auth
         self.cainfo = cainfo
         self.errors = []
         self.trace = []
         self.calls = {}
         self.multicall = False
+        config = Config()
         self.url = config.manifold_url()
         self.server = xmlrpclib.Server(self.url, verbose=False, allow_none=True)
 
@@ -55,7 +55,11 @@ class ManifoldAPI:
             try:
                 if debug:
                     print "====> ManifoldAPI.%s"%methodName,"auth",self.auth,"args",args,"kwds",kwds
-                result=getattr(self.server, methodName)(self.auth, *args, **kwds)
+                annotations = {
+                    'authentication': self.auth
+                }
+                args += (annotations,)
+                result=getattr(self.server, methodName)(*args, **kwds)
                 if debug:
                     print '<==== backend call %s(*%s,**%s) returned'%(methodName,args,kwds),
                     print '.ctd. Authmethod=',self.auth['AuthMethod'], self.url,'->',