| 1 |
NAME |
| 2 |
Authen::Simple::PAM - Simple PAM authentication |
| 3 |
|
| 4 |
SYNOPSIS |
| 5 |
use Authen::Simple::PAM; |
| 6 |
|
| 7 |
my $pam = Authen::Simple::PAM->new( |
| 8 |
service => 'login' |
| 9 |
); |
| 10 |
|
| 11 |
if ( $pam->authenticate( $username, $password ) ) { |
| 12 |
# successfull authentication |
| 13 |
} |
| 14 |
|
| 15 |
# or as a mod_perl Authen handler |
| 16 |
|
| 17 |
PerlModule Authen::Simple::Apache |
| 18 |
PerlModule Authen::Simple::PAM |
| 19 |
|
| 20 |
PerlSetVar AuthenSimplePAM_service "login" |
| 21 |
|
| 22 |
<Location /protected> |
| 23 |
PerlAuthenHandler Authen::Simple::PAM |
| 24 |
AuthType Basic |
| 25 |
AuthName "Protected Area" |
| 26 |
Require valid-user |
| 27 |
</Location> |
| 28 |
|
| 29 |
DESCRIPTION |
| 30 |
PAM authentication. |
| 31 |
|
| 32 |
METHODS |
| 33 |
* new |
| 34 |
This method takes a hash of parameters. The following options are |
| 35 |
valid: |
| 36 |
|
| 37 |
* service |
| 38 |
PAM service. Defaults to "login". |
| 39 |
|
| 40 |
service => 'sshd' |
| 41 |
|
| 42 |
* log Any object that supports "debug", "info", "error" and |
| 43 |
"warn". |
| 44 |
|
| 45 |
log => Log::Log4perl->get_logger('Authen::Simple::PAM') |
| 46 |
|
| 47 |
* authenticate( $username, $password ) |
| 48 |
Returns true on success and false on failure. |
| 49 |
|
| 50 |
SEE ALSO |
| 51 |
Authen::Simple. |
| 52 |
|
| 53 |
Authen::PAM. |
| 54 |
|
| 55 |
AUTHOR |
| 56 |
Christian Hansen "[email protected]" |
| 57 |
|
| 58 |
COPYRIGHT |
| 59 |
This program is free software, you can redistribute it and/or modify it |
| 60 |
under the same terms as Perl itself. |
| 61 |
|