[jdev] customized authentication not working

andrew kaspicka at shaw.ca
Mon Apr 25 18:14:24 CDT 2005

Hi there,

I've searched through the archives and found some details pertaining to my 
problem, but couldn't find follow up posts to some peoples questions.

I'm trying to write a component that adds one more step to the 
authentication process.  Along with the user/pass, I want to send a version 
number of the client that I'm using.  If the version number isn't acceptable 
(ie. older and not supported) I want to return an error.

In my jabber.xml I've added the xml for my service and used 
<auth>mycomponentname</auth> in order to have my component receive auth 

I'm using Perl and Net::Jabber and can get the component to successfully 
work with the server (handshake is successful), but I can't get my component 
to handle any jabber:iq:auth messages.

I've tried using both of these methods to trap the message, but neither work 
(I am not using both at the same time)...


$component->SetIQCallBacks("jabber:iq:auth"=>{ set => \&iqCB });

I've added some debug statements to the callback functions, but they never 
show up.  I see the jabber:iq:auth message in the debug info for the 
component wrapped in a <route> tag.  This is some of the output from the 
debug statements of the component...

NJ::Component: CallBack: sid(426D77B0) received(<route from='18 at c2s/8123D70' 
oto='user at host' to='versioncheck' type='auth'><iq id='j0' type='get'><query 

NJ::Component: CallBack: sid(426D77B0) received(<route from='18 at c2s/8123D70' 
oto='user at host/Resource' to='versioncheck' type='auth'><iq id='j1' 

This also appears which seems to be why authentication halts (freezes) on 
the client side...
NJ::Component: CallBack: a packet that no one wants... how sad. =(

Does anybody have any ideas?  Thanks.


More information about the JDev mailing list