[JDEV] Some more :)

Dennis Noordsij dennis.noordsij at wiral.com
Tue Nov 28 16:55:15 CST 2000


Hello,

I know it's a little rude to repeat the same question, but I really need 
the answer as it is pretty much the only thing stopping me from doing my 
authentication through a Perl script (I have given up on huge 
combinations of C files depending on specific libraries all missing one 
or another symbol etc when the Perl script does the LDAP authentication 
for me in 4 lines as long as I could get the jabber server to send me 
the password the user sent).

In order to make it easy to answer the question I will try to be as 
specific as possible.


I have made a Perl script that I would to use to authenticate users with 
that log into our jabber server. I am using the Net::Jabber perl module, 
though mostly to do the connecting to the jabberd server, parsing the 
login packet and composing the reply is quite easy. (brushing up on the 
old regex :)

I have defined  <service id="perlauth"> with an accept statement. I have 
added <auth>perlauth</auth> to the jsm section. I connect fine to the 
jabberd service. It reports my connection and when a user connections it 
says DELIVERING to perlauth module.

My module receives the request packet, basically an <iq> set inside of a 
<route> set. However, the only data contained within this login request 
is the username and the resource.

Now, the old auth modules are still present. Maybe I am supposed to 
reject this login, after which a new login packet is sent containing the 
password? Right now the original mod_auth accepts the connection if I 
don't. If I do accept the connection, I basically logged the user in 
without ever even knowing what password he/she entered :-))

I need to know how to do this, how to get the password the user entered, 
I also need to know how to reject a request, accept it, basically do 
anything what an auth module is supposed to do.

I know it's asking for much, but here I am having a lot of time to spend 
on doing this and it's a waste if lack of documentation delays so much. 
I do want jabber to become big and I have a million ideas for it, I 
spend most of my time doing something related to it, experimenting, but 
it is so undocumented. There are few examples, I know know, read the 
source, and it has helped on a lot of occasions, but, this mailinglist 
is my only up-to-date source :) Every time I have logged into #jabber 
noone actually said anything :-)

  Schuyler, your example worked very well, and helped me along quite a 
lot, I just need a little more info to get it all to work :) Don't think 
I am not grateful for the help so far :)

Kind regards,
Dennis





More information about the JDev mailing list