-
Notifications
You must be signed in to change notification settings - Fork 43
always invalid login #6
Comments
okay if i comment out the other encryptions and I'm using only PLAIN it works, but not because if I wants to attach with strophe i got an error: "401 invalid sid" |
Hi, I am using openfire in server and candy chat in my website. When I am trying to use xmpp-prebind-php library, I got the PHP Fatal error: Uncaught exception 'XmppPrebindException' with message 'Invalid login'. I am using the below code: My openfire is installed in http://domain.com:9090 Anybody can solve this issue, Please help me... Thanks, |
Hi Akhilesh Are you sure that you're using the correct username and password? Sent from my iPhone
|
Hi Jonatan, Thanks for your mail. I am sure, this is correct username and password. Full error report displayed in the browser is: The response shows in the console log is: Thansk, On Fri, Jul 18, 2014 at 4:10 PM, Jonatan Männchen [email protected]
AKHILESH PV [image: http://cubettech.com/] http://cubettech.com/ |
On weekdays I'm in military service and can't really analyse your logs / debug the problem... |
@mweibel Do you know how to solve this? On a cellphone my ressources are verry limited ;-) |
@akhileshpv could you show us by comparison a log from the failed login generated by the prebind lib? |
Hi Michael, I have tested the xmpp-prebind-php library with different encryption Openfire URL: http://cnexion.com:9090 sid: f4a274d4 SENT: HTTP ERROR: 404Problem accessing Invalid SID. Powered by Jetty:// sid: 18c83aae SENT: sid: bcb2256a DIGEST-MD5 Auth String: username="akhilesh",realm="cnexion.com SENT: Thanks, On Mon, Jul 21, 2014 at 5:36 PM, Michael Weibel [email protected]
AKHILESH PV [image: http://cubettech.com/] http://cubettech.com/ |
Hi Michael, Let me know, did you get any solution for this query? Thanks, On Mon, Jul 21, 2014 at 5:44 PM, Akhilesh PV [email protected] wrote:
AKHILESH PV [image: http://cubettech.com/] http://cubettech.com/ |
sorry, which one is now the log from the php lib and which one is from Candy? // Edit: please format them as code btw |
Hi Michael, These all are from xmpp-prebind-php library with different encryption used. Thanks, |
Ok. Could you show the code you use? |
Hi Michael, This is the code we used for fetch session info. require_once './prebind/lib/XmppPrebind.php'; Candy chat working fine in my case with using the login method Candy.Core.connect('jid', 'password'). I need to use the Candy.Core.attach(jid, sid, rid) for HTTP pre-binding for manage sessions. Otherwise, in candy chat, we need to login every page refresh. Thanks, |
What happens if you change the Resource in the |
Hi Michael, I have used the Resource 'Wsite' instead of 'Candy'. But I got the same response. Now I used the DIGEST-MD5 encryption. The console loge is SENT: Also the error report is Do we need modify any configuration in openfire or server side? Thanks, |
Hi Michael, I got the Session Information from server when I try the same code with PLAIN encryption. Below I included my full code. Can you please look at this and let me know if anything is wrong? Because, when I have passed the JID, SID and RID in the method Candy.Core.attach(jid, sid, rid), I got the authentication error "Authentication failed".
Thanks, |
You need to do |
Hi Michael, Thank you... Its working. But one another problem. Actually my aim is to keep the session once the user logged in candy chat. So I have saved the session info in php session variable ($_SESSION['sessionInfo'] = $sessionInfo;) and try to reuse it. But I got the error message "Invalid SID" when use the saved session info in another page load. Can you please suggest me a solution for keep the candy chat session in every page load? Because the candy chat shows all pages in my application (Web site). Thanks, |
Hi Michael, Can you please give me an idea to reuse the session in candy chat on every page load? Thanks, |
Please don't post the same question twice. Candy uses the event |
Hi @mweibel @akhileshpv , FYI, I use Openfire/converse.js, as @akhileshpv said, do we need to modify any configuration in openfire or anything I setup is wrong? require(['converse'], function (converse) { Thanks, |
As always, please send debug infos, otherwise I'm unable to help. |
my page code: <?php
session_start();
if(empty($_SESSION['sessionInfo'])){
require './lib/XmppPrebind.php';
$xmppPrebind = new XmppPrebind('210.184.xxx.xx', 'http://210.184.xxx.xx:7070/http-bind/', '', false, true);
$xmppPrebind->connect('miles', '916218');
$xmppPrebind->auth();
$sessionInfo = $xmppPrebind->getSessionInfo(); // array containing sid, rid and jid
$_SESSION['sessionInfo'] = $sessionInfo;
//print_r($sessionInfo);exit;
}else{
$sessionInfo = $_SESSION['sessionInfo'];
}
?>
<!DOCTYPE html>
... require(['converse'], function (converse) {
converse.initialize({
prebind: true,
debug: true,
bosh_service_url: 'http://210.184.xxx.xx:7070/http-bind/', //didn't have a domain
jid: "<?=$sessionInfo['jid']; ?>",
sid: "<?=$sessionInfo['sid']; ?>",
rid: "<?=$sessionInfo['rid']; ?>",
auto_list_rooms: true,
auto_subscribe: false,
hide_muc_server: false,
i18n: locales.en, // Refer to ./locale/locales.js to see which locales are supported
show_controlbox_by_default: true,
xhr_user_search: false
});
}); The console logs as following,
2:Using CRAM_MD5 encryption(in normal loading speed), still no console logs,
3:Using PLAIN encryption,about several seconds refresh the page
__ 2) The 2nd time loading page,__
__ 3) The 3rd time loading page,__
__ 4) The 4th time loading page(404 (Not Found))__
__ 5) The 5th time loading page(404 (Invalid SID.))__
Thanks, |
Could you paste the debug output of the XmppPrebind class? |
@mweibel well I suggest you can just forget the console log, I finally got that rid should be unique while sending request every time.Now let me put this question more clear, |
Also please note I'm not actively developing in PHP anymore, therefore please try to fix it on your own and send a PR. |
I was with the same error, but at the moment I will use the plain mode, here is my xmpp debug: send:
recv:
sid:
encryption used:
send:
recv:
digest-md5 auth string:
sent:
recv:
|
i used the code like in the example and i got always an error called "invalid login", I'm using openfire as the server.. can you help me? :)
The text was updated successfully, but these errors were encountered: