SYNOPSIS
Inside the AuthServer.cf file:
$cfg = \%PAPI::AuthServer::cfgVar;
$$cfg{workingDirectory} = "/usr/local/PAPI/AS/etc";
. . . $$cfg{authenticationHook} = \&PAPI::IMAPAuth::IMAPUser; $$cfg{credentialHook} = \&PAPI::BasicAuth::AllSites; $$cfg{attrRequestHook} = \&PAPI::BasicAuth::DefAttributes; $$cfg{IMAPServer} = "imap.dom.ain"; $$cfg{basicAuthDB} = "Basic.pdb";
REQUIRES
Net::IMAP::Simple
DESCRIPTION
These functions implement PAPI user authentication using the IMAP protocol. Credential data provision must use different mechanisms, found in other modules.
FUNCTIONS
- IMAPUser($con, $cfg)
- This function is intended to be hooked at the authenticationHook in a PAPI AuthServer. It uses the connection variables username and password to validate them against the IMAP server defined by the configuration variable IMAPServer (``imap'' by default).
- The username returned to the AuthServer depends on the configuration variable IMAPUID, that may take the values:
- IMAPUSER, the format is ``username'' (this is the default).
- IMAPSERVER, the format is ``username@IMAPServer''.
- Arguments:
- $con: Hash with the PAPI AuthServer connection variables.
- $cfg: Hash with the PAPI AuthServer configuration variables.