#NEWLINE# def _authenticate( self ) : #NEWLINE# #INDENT# message_dict = self . _authenticate_make_message ( ) #NEWLINE# method = 'conduit.connect' #NEWLINE# response = self . _communicate ( method , message_dict ) #NEWLINE# error = response [ 'error_code' ] #NEWLINE# error_message = response [ 'error_info' ] #NEWLINE# result = response [ 'result' ] #NEWLINE# is_conduitproxy = False #NEWLINE# if error : #NEWLINE# #INDENT# if ( error == CONDUITPROXY_ERROR_CONNECT ) : #NEWLINE# #INDENT# is_conduitproxy = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ConduitException ( method = method , error = error , errormsg = error_message , result = result , obj = message_dict , uri = self . _conduit_uri , actAsUser = self . _act_as_user ) #NEWLINE# #UNINDENT# #UNINDENT# if is_conduitproxy : #NEWLINE# #INDENT# self . _conduit = { #NEWLINE# #INDENT# 'user' : self . _username , #NEWLINE# 'cert' : self . _certificate , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _conduit = { #NEWLINE# #INDENT# 'sessionKey' : result [ 'sessionKey' ] , #NEWLINE# 'connectionID' : result [ 'connectionID' ] , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if self . _act_as_user : #NEWLINE# #INDENT# self . _conduit [ 'actAsUser' ] = self . _act_as_user