server/sources/__init__.py
changeset 9512 88dc96fc9fc1
parent 9469 032825bbacab
child 9543 39f981482e34
equal deleted inserted replaced
9511:241b1232ed7f 9512:88dc96fc9fc1
   344         self.del_schema_config(schemacfg, checkonly)
   344         self.del_schema_config(schemacfg, checkonly)
   345         self.add_schema_config(schemacfg, checkonly)
   345         self.add_schema_config(schemacfg, checkonly)
   346 
   346 
   347     # user authentication api ##################################################
   347     # user authentication api ##################################################
   348 
   348 
   349     def authenticate(self, session, login, **kwargs):
   349     def authenticate(self, cnx, login, **kwargs):
   350         """if the source support CWUser entity type, it should implement
   350         """if the source support CWUser entity type, it should implement
   351         this method which should return CWUser eid for the given login/password
   351         this method which should return CWUser eid for the given login/password
   352         if this account is defined in this source and valid login / password is
   352         if this account is defined in this source and valid login / password is
   353         given. Else raise `AuthenticationError`
   353         given. Else raise `AuthenticationError`
   354         """
   354         """
   355         raise NotImplementedError(self)
   355         raise NotImplementedError(self)
   356 
   356 
   357     # RQL query api ############################################################
   357     # RQL query api ############################################################
   358 
   358 
   359     def syntax_tree_search(self, session, union,
   359     def syntax_tree_search(self, cnx, union,
   360                            args=None, cachekey=None, varmap=None, debug=0):
   360                            args=None, cachekey=None, varmap=None, debug=0):
   361         """return result from this source for a rql query (actually from a rql
   361         """return result from this source for a rql query (actually from a rql
   362         syntax tree and a solution dictionary mapping each used variable to a
   362         syntax tree and a solution dictionary mapping each used variable to a
   363         possible type). If cachekey is given, the query necessary to fetch the
   363         possible type). If cachekey is given, the query necessary to fetch the
   364         results (but not the results themselves) may be cached using this key.
   364         results (but not the results themselves) may be cached using this key.