/usr/share/perl5/Jifty/Plugin/AuthzLDAP/Action/LDAPValidate.pm is in libjifty-plugin-authzldap-perl 0.90000-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | use warnings;
use strict;
=head1 NAME
Jifty::Plugin::AuthzLDAP::Action::LDAPValidate - action to validate filter
=cut
package Jifty::Plugin::AuthzLDAP::Action::LDAPValidate;
use base qw/Jifty::Action Jifty::Plugin::AuthzLDAP/;
our $VERSION = '0.01';
=head2 arguments
Return the ticket form field
=cut
sub arguments {
return (
{
name => {
mandatory => 1
},
filter => {
mandatory => 1
},
}
);
}
=head2 take_action
Bind on ldap to check the user's password. If it's right, log them in.
Otherwise, throw an error.
=cut
sub take_action {
my $self = shift;
my $user = $self->argument_value('name');
my $filter = $self->argument_value('filter');
Jifty->log->debug("action: $user $filter");
# Bind on ldap
#my $msg = $self->bind();
my $msg = $self->ldapvalidate($user,$filter);
Jifty->log->debug("validate: $msg");
if (not $msg) {
$self->result->error(
_('Access denied.') );
return;}
return 1;
}
=head1 AUTHOR
Yves Agostini, <yvesago@cpan.org>
=head1 LICENSE
Copyright 2007-2008 Yves Agostini. All Rights Reserved.
This program is free software and may be modified and distributed under the same terms as Perl itself.
=cut
1;
|