Get the vhost info in auth module

Rohan Almeida rohan at almeida.in
Mon Jul 27 11:52:19 UTC 2009


Hi,

I'm rolling my own Authentication module, but I fail to see how 
to get the connecting vhost info.

<VHost my.com>

       <Plugin DJabberd::RosterStorage::SQLite>
           Database roster.sqlite
       </Plugin>

       <Plugin My::Auth>
           #Users   buddy
       </Plugin>

       <Plugin DJabberd::Delivery::Local />
       <Plugin DJabberd::Delivery::S2S />

</VHost>

In My/Auth.pm

sub check_cleartext {
       my ($self, $cb, %args) = @_;
       my $username = $args{username};
       my $password = $args{password};
       my $conn = $args{conn};

}

So I get the username, password and the $conn ISA 
DJabberd::Connection::ClientIn

I can see that I get all the vhosts using:

my $vhosts = $conn->server->vhosts;

but how I do know which vhost is currently connecting?


Thanks,
Rohan





More information about the Djabberd mailing list