#NEWLINE# def _cbAuthQuery( self , iq ) : #NEWLINE# #INDENT# jid = self . xmlstream . authenticator . jid #NEWLINE# password = self . xmlstream . authenticator . password #NEWLINE# reply = xmlstream . IQ ( self . xmlstream , 'set' ) #NEWLINE# reply . addElement ( ( 'jabber:iq:auth' , 'query' ) ) #NEWLINE# reply . query . addElement ( 'username' , content = jid . user ) #NEWLINE# reply . query . addElement ( 'resource' , content = jid . resource ) #NEWLINE# if DigestAuthQry . matches ( iq ) : #NEWLINE# #INDENT# digest = xmlstream . hashPassword ( self . xmlstream . sid , unicode ( password ) ) #NEWLINE# reply . query . addElement ( 'digest' , content = digest ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# reply . query . addElement ( 'password' , content = password ) #NEWLINE# #UNINDENT# d = reply . send ( ) #NEWLINE# d . addCallbacks ( self . _cbAuth , self . _ebAuth ) #NEWLINE# return d