Authen::CyrusSASL - simple Sasl Authen Daemon client facilities
use Authen::CyrusSASL; $p = new Authen::CyrusSASL(Type => SASL_AUTHD, Dir => '/var/run/saslauthd'); print "check=", $r->check_pwd('username', 'userpass'), "\n"; $p = new Authen::CyrusSASL(Type => SASL_PWCHECK, Dir => '/var/run/pwcheck'); print "check=", $r->check_pwd('username', 'userpass'), "\n";
The Authen::CyrusSASL module provides a simple class that allows you to send request to the cyrus-sasl's 2.0 authen daemon. This module is based on the Authen::Radius module with the similar interface.
Authen::CyrusSASL
Creates & returns a blessed reference to a Authen::CyrusSASL object, or undef on failure. Error is saved into $!. Use undef on the return value if you want to undef the underlying unix socket.
There are two types for Type attribute - one for saslauth daemon and one for old pwcheck daemon (SASL_PWCHECK). The Type attribute is obligatory.
The default value for Dir is '/var/run/pwcheck' (it then looks for the path '/var/run/pwcheck/pwcheck') for pwcheck method, and '/var/run/saslauthd' (path '/var/run/saslauthd/mux') for saslauthd method. You can specify the full path for pwcheck or mux special files with the Path attribute.
The TimeOut value is self explonatory.
Checks with the SASL server if the specified PASSWORD is valid for user USERNAME. It returns SASL_OK if the PASSWORD is correct, SASL_FAIL if the connection fails, or SASL_BADAUTH if the password or the username is incorrect (possible error is in the $! variable).
PASSWORD
USERNAME
Cyrus-sasl archive located at ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
Piotr Klaban <poczta@klaban.torun.pl>
To install Authen::CyrusSASL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Authen::CyrusSASL
CPAN shell
perl -MCPAN -e shell install Authen::CyrusSASL
For more information on module installation, please visit the detailed CPAN module installation guide.