original_string: public function authFieldsHandler($xml) {
  			$id = $this->getId();
  			$this->addidhandler($id, 'oldAuthResultHandler');
  			if($xml->sub('query')->hasSub('digest')) {
  				$hash = sha1($this->session_id . $this->password);
  				print "{$this->session_id} {$this->password}\n";
  				$out = "<iq type='set' id='$id'><query xmlns='jabber:iq:auth'><username>{$this->user}</username><digest>{$hash}</digest><resource>{$this->resource}</resource></query></iq>";
  			} else {
  				$out = "<iq type='set' id='$id'><query xmlns='jabber:iq:auth'><username>{$this->user}</username><password>{$this->password}</password><resource>{$this->resource}</resource></query></iq>";
  			}
  			$this->send($out);
  
  		}
code: public function authFieldsHandler($xml) {
  			$id = $this->getId();
  			$this->addidhandler($id, 'oldAuthResultHandler');
  			if($xml->sub('query')->hasSub('digest')) {
  				$hash = sha1($this->session_id . $this->password);
  				print "{$this->session_id} {$this->password}\n";
  				$out = "<iq type='set' id='$id'><query xmlns='jabber:iq:auth'><username>{$this->user}</username><digest>{$hash}</digest><resource>{$this->resource}</resource></query></iq>";
  			} else {
  				$out = "<iq type='set' id='$id'><query xmlns='jabber:iq:auth'><username>{$this->user}</username><password>{$this->password}</password><resource>{$this->resource}</resource></query></iq>";
  			}
  			$this->send($out);
  
  		}
code_tokens: public function authFieldsHandler ( $ xml ) { $ id = $ this -> getId ( ) ; $ this -> addidhandler ( $ id , 'oldAuthResultHandler' ) ; if ( $ xml -> sub ( 'query' ) -> hasSub ( 'digest' ) ) { $ hash = sha1 ( $ this -> session_id . $ this -> password ) ; print "{$this->session_id} {$this->password}\n" ; $ out = "<iq type='set' id='$id'><query xmlns='jabber:iq:auth'><username>{$this->user}</username><digest>{$hash}</digest><resource>{$this->resource}</resource></query></iq>" ; } else { $ out = "<iq type='set' id='$id'><query xmlns='jabber:iq:auth'><username>{$this->user}</username><password>{$this->password}</password><resource>{$this->resource}</resource></query></iq>" ; } $ this -> send ( $ out ) ; }
docstring: Retrieve auth fields and send auth attempt
  
  @param XMLObj $xml
docstring_tokens: Retrieve auth fields and send auth attempt