added request_hash argument. authenticate the credential using request_hash
[sfa.git] / sfa / methods / register.py
index 6c4820a..b266a64 100644 (file)
@@ -31,12 +31,14 @@ class register(Method):
     
     accepts = [
         Parameter(str, "Credential string"),
-        Parameter(dict, "Record dictionary containing record fields")
+        Parameter(dict, "Record dictionary containing record fields"),
+        Parameter(str, "Request hash")
         ]
 
     returns = Parameter(int, "String representation of gid object")
     
-    def call(self, cred, record_dict, caller_cred=None):
+    def call(self, cred, record_dict, request_hash, caller_cred=None):
+        self.api.auth.authenticateCred(cred, [cred, record_dict], request_hash)
         self.api.auth.check(cred, "register")
         if caller_cred==None:
                caller_cred=cred