You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
As told on issue #16 I have had troubles with authentication when using this library, I don't think there's a special setting inside openfire for bosh encryption setup. I have had weird behavior with auth. My php code is just
// Fake proof of concept, just a test but worksini_set('max_execution_time', 300); //300 seconds = 5 minutestry {
require_once("lib/XmppPrebind.php");
$username = "test";
$password = "test";
$jabberHost = "myhost.domain.local";
$boshUri = "http://myhost.domain.local:7070/http-bind/";
$resource = "resource";
$xmppPrebind = newXmppPrebind($jabberHost, $boshUri, $resource, false, false);
$xmppPrebind->connect($username, $password);
$xmppPrebind->auth();
var_dump($xmppPrebind->getSessionInfo());
} catch (Exception$e) {
echo$e->getMessage();
}
I have added a line in your connect() function, I know this is just a weird and dirty hack but works. I don't like it so suggestions are welcomed, Changes:
if (in_array(self::ENCRYPTION_DIGEST_MD5, $this->mechanisms)) {
$this->encryption = self::ENCRYPTION_DIGEST_MD5;
} elseif (in_array(self::ENCRYPTION_CRAM_MD5, $this->mechanisms)) {
$this->encryption = self::ENCRYPTION_CRAM_MD5;
} elseif (in_array(self::ENCRYPTION_PLAIN, $this->mechanisms)) {
$this->encryption = self::ENCRYPTION_PLAIN;
} else {
thrownewXmppPrebindConnectionException("No encryption supported by the server is supported by this library.");
}
$this->encryption = self::ENCRYPTION_PLAIN;
$this->debug($this->encryption, 'encryption used');
my add is just "$this->encryption = self::ENCRYPTION_PLAIN;". I was thinking about adding
a third (optional) parameter on connect() for specifying preferred authentication method, may I submit a pull request for it ?
Ben
The text was updated successfully, but these errors were encountered:
Hi there,
As told on issue #16 I have had troubles with authentication when using this library, I don't think there's a special setting inside openfire for bosh encryption setup. I have had weird behavior with auth. My php code is just
I have added a line in your connect() function, I know this is just a weird and dirty hack but works. I don't like it so suggestions are welcomed, Changes:
my add is just "$this->encryption = self::ENCRYPTION_PLAIN;". I was thinking about adding
a third (optional) parameter on connect() for specifying preferred authentication method, may I submit a pull request for it ?
Ben
The text was updated successfully, but these errors were encountered: