Authen::PAM::Module - Base module for writing Pam Modules in Perl
package Authen::PAM::Module::xxxxxx; use Authen::PAM::Module qw(type type); our @ISA=qw(Authen::PAM::Module); sub ... { my $handle=shift; my $flags=shift; my @args=@_; $handle->{item} $handle->{user} $handle->{env} $handle->{data}
Authen::PAM::Module is a base class to be inhereted by perl modules whishing to function as PAM (Plugable Authentication Modules) modules.
The first paramater passed must be the user module name relitave to Authen::PAM::Module::. All paramaters are passed unchanged.
Only the following methods are overridable:
new($class, $pamh, $flags, @args): constructor called from first function call. If you overload it, call it to initilize your tied vars, etc. authenticate($handle, $flags, @args): setcred($handle, $flags, @args): acct_mgmt($handle, $flags, @args): open_session($handle, $flags, @args): close_session($handle, $flags, @args): chauthtok($handle, $flags, @args): DESTROY:
The following methods are interfaces to the pam library.
The following are tied vars and other constructs to provide the rest of the api.
$handle->{data} for private storage by child modules (pam_set_data, pam get_data equivilent. no access to other modules data) $handle->{user} username, blessed scalar read only $handle->{item} pam items, blessed hash read write $handle->{env} pam envroment, blessed hash read write
general notes: when reading the pam documentation
None by default.
other this tag has all constants not otherwise classified. If you use one, please let me know so I can file it correctly. data this tag has constants for module private storage. If you need this I made a mistake, please let me know. misc the functions strerr and fail_delay and their constants (linux pam specific). item user conv env auth acct sess pass
Original version; created by h2xs 1.23 and then mangled by hand extensively.
Pam Module Writing Guide. Authen::PAM
Ben Hildred<lt>bhildred@cpan.org<gt>
Copyright (C) 2011 by Ben Hildred
This library is free software; you can redistribute it under the following conditions: Until it is fully functional you must maintain this copyright notice, fix at least one bug, notify all upstream authors of all changes and adhear to all conditions of GNU GPL 2.0 or later. (Distribution mirrors (i.e. CPAN, Debian nonfree) and mailing lists are allowed unlimited disribution, provided the poster makes a good faith attempt to adhear) Once this is fully functional, the previous clause may be droped and you may redistribute and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
To install ExtUtils::Constant, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ExtUtils::Constant
CPAN shell
perl -MCPAN -e shell install ExtUtils::Constant
For more information on module installation, please visit the detailed CPAN module installation guide.