Apache2-AuthCookieLDAP

 view release on metacpan or  search on metacpan

lib/Apache2/AuthCookieLDAP.pm  view on Meta::CPAN

=over 4

=back

=head1 CLASS METHODS

=head2 cipher($r)

Returns a cipher for the encyption method specified in
the corresponding apache config directive.

=head2 config($r, $req_key)

Returns a value for the specified $req_key.

=head2 ldap($r)

Returns Net::LDAP handler or NULL if there were errors.

=head2 ldap_search($r, $user)

Performs Net::LDAP->search(base => $base, scope => 'base', filter => $filter)
and returns '1' if the specified $user is found or otherwise '0'.

=head2 ldap_check_user($r, $user, $password)

Performs Net::LDAP->bind($base, password => $password).

(%USER% is replaced by $user in $base)

=head2 rlog($r, $msg)

Logs $msg using $r->log_rerror and the current debug log level.

=head2 fatal($r, $msg)

Logs $msg using $r->log_rerror and the current error log level.

=head2 encode_string($r, $msg)

Encodes the specified string into a hex string.

=head2 decode_string($r, $msg)

Decodes the specified hex string and returns a string.

=head2 create_hash($r, $str)

Generates and returns a hash from the provided string.

=head2 encrypt_session($r, $str)

Encrypts $str and returns the provided session string.

=head2 decrypt_session($r, $str)

Decrypts $str and returns the provided encrypted session string.

=head2 check_expire_time($r, $session_time)

Checks the provided session time (unixtime) with the current time
and returns '0' if the session time is still valid or '1' if passed.

=head2 authen_cred($r, $user, $password, @extra_data) 

This is the overridden method of Apache::AuthCookie and is used to
authenticate $user with the provided $password

Returns the encrypted session key in case of successfull authentication.

Please follow to Apache2::AuthCookie if you need more information about the method.

=head2 authen_ses_key($r, $session_key)

This is the overridden method of Apache::AuthCookie and is used to
validate the provided $session_key. 

Returns the authenticated username in case of success or redirects to the login page otherwise.

Please follow to Apache2::AuthCookie if you need more information about the method.

=head1 SUBCLASSING

You can subclass the module and override any of the available methods.

=head1 CREDITS

"SecretKey", "Lifetime" Apache config directive names and their definition style 
are similar to Apache2::AuthCookieDBI to keep it common for those 
who use both of the modules.

Authors of Apache2::AuthCookieDBI 

Authors of Apache2::AuthCookie

=head1 COPYRIGHT

Copyright (C) 2013 Kirill Solomko

=head1 LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

=head1 BUGS

Please report any bugs or feature requests through the web interface at:
 http://rt.cpan.org/Public/Dist/Display.html?Name=Apache2-AuthCookieLDAP

=head1 TODO

=over 4

=item Add package tests.

=back

=head1 SEE ALSO

L<perl(1)>, L<Apache2::AuthCookie>, L<Apache2::AuthCookieDBI>

=cut



( run in 1.530 second using v1.01-cache-2.11-cpan-d8267643d1d )