[jdev] Re: Component for registering users

Wojtek wode at winuel.com.pl
Mon Mar 22 06:39:28 CST 2004


Not all is clear for me.  Write whole packets, please.

> will create accounts on the fly for any successfully auth'd user , if
> they don't have one...

If an user is auth'd why hasn't he an account?

Your component (comp.server.com) receives a packet of:
<route type='auth' ...>
   <iq type='set' ...>
     <query xmlns='jabber:iq:auth'> ... </query>

How is it routed from jsm?  Is registration enabled in jabber.xml file?

Then the component sends something like:
<xdb type='set' to='user at server.com' from='comp.server.com' 

Then the component sends:
<xdb type='set' to='user at server.com' from='comp.server.com'>
   <query xmlns='jabber:iq:auth' xdbns='jabber:iq:auth'>
     <resource>user's resource</resourc>
     <x xmlns='jabber:x:delay' stamp='20030324T08:56:10'>Registered</x>

I think it should be jabber:iq:register.  Shouldn't it?

What is the final <route/> packet?

So, using the above technique I can try the following:
1. disable user registering in jabber.xml
2. login as admin with some client (the component rejects other user's 
3. send custom <message/> or <iq/> to comp.server.com (the component)
    with XML console (or silently with dedicated client)
4. analyze request
5. send
      <xdb type='set' to='user at server.com' ...>
        <query xmlns='jabber:iq:register' xdbns='jabber:iq:register'>
    or respond with an error
6. have user at server.com registered with 123 password

Will it work?


On Fri, 19 Mar 2004 07:36:09 -0500, Katz, Dov B (IT) 
<Dov.Katz at morganstanley.com> wrote:

> I've been able to do it in a custom auth module I wrote in java... It
> will create accounts on the fly for any successfully auth'd user , if
> they don't have one...
> Once I have a gateway connected to the jabberserver as
> "gateway.myserver.com" I do this:
> When I receive a route type="auth" with an iq "set" in it, I do the
> necessary checks, and route back an error if it fails.
> If it succeeds, I send xdb "set" to "user at server.com" from
> "myserver.com" with the xdbns "jabber:iq:auth", and
> <username>user</username> in it.
> Then I send back a xdb set to the same to/from pair with <query
> xmlns='jabber:iq:auth'><resource>user's resource</resourc>  with
> jabber:x:delay in there of the current time, with the content
> "Registered"
> After doing that, I route an auth "result" IQ packet back to the user.
> It works fine for me, and there hasn't been an error since going live
> with almost 1000 new user registrations.
> HTH,
> -Dov
>> -----Original Message-----
>> From: jdev-bounces at jabber.org
>> [mailto:jdev-bounces at jabber.org] On Behalf Of wode at winuel.com.pl
>> Sent: Friday, March 19, 2004 5:59 AM
>> To: jdev at jabber.org
>> Subject: [jdev] Component for registering users
>> Hi
>> Is it possible to write component that registers users?
>> I'd like to disable registering by users themselves.
>> Administrator could then send <message/> or <iq/> packet to
>> component JID with some registration request.
>> Can the component do registration job sending some packets to
>> jsm, xdb or etc.?
>> Wojtek
>> _______________________________________________
>> jdev mailing list
>> jdev at jabber.org
>> https://jabberstudio.org/mailman/listinfo/jdev
> --------------------------------------------------------
> NOTICE: If received in error, please destroy and notify sender.  Sender 
> does not waive confidentiality or privilege, and use is prohibited.

More information about the JDev mailing list