Ejemplo n.º 1
0
 public static function handshake($id, $jaxl)
 {
     $pass = JAXLPlugin::execute('jaxl_pre_handshake');
     $hash = strtolower(sha1($id . $pass));
     $xml = '<handshake>' . $hash . '</handshake>';
     XMPPSend::xml($xml, $jaxl);
 }
Ejemplo n.º 2
0
 public static function challenge($arr, $jaxl)
 {
     if ($arr['xmlns'] == "urn:ietf:params:xml:ns:xmpp-sasl") {
         if ($jaxl->secondChallenge) {
             $xml = '<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>';
         } else {
             $xml = XMPPAuth::getResponse($jaxl->authType, $arr['challenge'], $jaxl);
         }
         XMPPSend::xml($xml, $jaxl);
     }
 }
Ejemplo n.º 3
0
 public static function ping($jaxl)
 {
     $xml = '';
     $xml .= '<body rid="' . ++$jaxl->bosh['rid'] . '"';
     $xml .= ' sid="' . $jaxl->bosh['sid'] . '"';
     $xml .= ' xmlns="http://jabber.org/protocol/httpbind"/>';
     $_SESSION['auth'] = true;
     XMPPSend::xml($xml, $jaxl);
 }