slackget10::Network::Auth - The authentification/authorization class for slack-getd network deamons.
Version 1.0.0
This class is used by slack-get daemon's to verify the permission of an host.
use slackget10::Network::Auth; my $auth = slackget10::Network::Auth->new($config); if(!$auth->can_connect($client->peerhost())) { $client->close ; }
The constructor just take one argument: a slackget10::Config object :
my $auth = new slackget10::Network::Auth ($config);
All methods name are the same as configuration file directives, but you need to change '-' to '_'.
All methods return TRUE (1) if directive is set to 'yes', FALSE (0) if set to 'no' and undef if the directive cannot be found in the slackget10::Config. For some secure reasons, all directives are in read-only access. But in the real use the undef value must never been returned, because all method fall back to the <all> section on undefined value. So if a method return undef, this is because the <daemon> -> <connection-policy> -> <all> section is not complete, and that's really a very very bad idea !
Take an host address and return the appropriate value.
$auth->can_connect($client->peerhost) or die "client is not allow to connect\n";
DUPUIS Arnaud, <a.dupuis@infinityperl.org>
<a.dupuis@infinityperl.org>
Please report any bugs or feature requests to bug-slackget10-networking@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=slackget10. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-slackget10-networking@rt.cpan.org
Copyright 2005 DUPUIS Arnaud, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install slackget10, copy and paste the appropriate command in to your terminal.
cpanm
cpanm slackget10
CPAN shell
perl -MCPAN -e shell install slackget10
For more information on module installation, please visit the detailed CPAN module installation guide.