[Catalyst-commits] r7399 - in
trunk/Catalyst-Plugin-Authentication-Store-LDAP: .
lib/Catalyst/Plugin/Authentication/Store
lib/Catalyst/Plugin/Authentication/Store/LDAP t
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Wed Jan 16 17:29:14 GMT 2008
Author: karpet
Date: 2008-01-16 17:29:13 +0000 (Wed, 16 Jan 2008)
New Revision: 7399
Modified:
trunk/Catalyst-Plugin-Authentication-Store-LDAP/Changes
trunk/Catalyst-Plugin-Authentication-Store-LDAP/META.yml
trunk/Catalyst-Plugin-Authentication-Store-LDAP/Makefile.PL
trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP.pm
trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP/Backend.pm
trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP/User.pm
trunk/Catalyst-Plugin-Authentication-Store-LDAP/t/01-pre_realms_api.t
trunk/Catalyst-Plugin-Authentication-Store-LDAP/t/02-realms_api.t
Log:
skip timeouts in tests, add AD docs, bump req base version
Modified: trunk/Catalyst-Plugin-Authentication-Store-LDAP/Changes
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Store-LDAP/Changes 2008-01-16 16:38:53 UTC (rev 7398)
+++ trunk/Catalyst-Plugin-Authentication-Store-LDAP/Changes 2008-01-16 17:29:13 UTC (rev 7399)
@@ -1,5 +1,8 @@
-0.0601 karman
+0.0601 karman 16 Jan 2008
- changed release date for 0.0600
+ - added AD config suggestions from matija at serverflow.com
+ - bumped req base Auth package to 0.10002
+ - added timeout checks to tests since openldap.org might not be available
0.0600 karman 18 Oct 2007 [was: omega Thu Aug 09 09:22:00 CET 2007]
Modified: trunk/Catalyst-Plugin-Authentication-Store-LDAP/META.yml
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Store-LDAP/META.yml 2008-01-16 16:38:53 UTC (rev 7398)
+++ trunk/Catalyst-Plugin-Authentication-Store-LDAP/META.yml 2008-01-16 17:29:13 UTC (rev 7399)
@@ -1,10 +1,11 @@
---
abstract: Authenticate Users against LDAP Directories
-author: Adam Jacob <holoway at cpan.org>
+author:
+ - Adam Jacob <holoway at cpan.org>
build_requires:
Test::More: 0
distribution_type: module
-generated_by: Module::Install version 0.67
+generated_by: Module::Install version 0.68
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.3.html
@@ -16,6 +17,6 @@
- t
requires:
Catalyst::Model::LDAP: 0
- Catalyst::Plugin::Authentication: 0
+ Catalyst::Plugin::Authentication: 0.10002
Net::LDAP: 0
-version: 0.0600
+version: 0.0601
Modified: trunk/Catalyst-Plugin-Authentication-Store-LDAP/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Store-LDAP/Makefile.PL 2008-01-16 16:38:53 UTC (rev 7398)
+++ trunk/Catalyst-Plugin-Authentication-Store-LDAP/Makefile.PL 2008-01-16 17:29:13 UTC (rev 7399)
@@ -7,7 +7,7 @@
license('perl');
requires('Net::LDAP');
-requires('Catalyst::Plugin::Authentication');
+requires('Catalyst::Plugin::Authentication' => '0.10002');
requires('Catalyst::Model::LDAP');
build_requires('Test::More');
Modified: trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP/Backend.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP/Backend.pm 2008-01-16 16:38:53 UTC (rev 7398)
+++ trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP/Backend.pm 2008-01-16 17:29:13 UTC (rev 7399)
@@ -76,7 +76,7 @@
use strict;
use warnings;
-our $VERSION = '0.0600';
+our $VERSION = '0.0601';
use Catalyst::Plugin::Authentication::Store::LDAP::User;
use Net::LDAP;
Modified: trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP/User.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP/User.pm 2008-01-16 16:38:53 UTC (rev 7398)
+++ trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP/User.pm 2008-01-16 17:29:13 UTC (rev 7399)
@@ -45,7 +45,7 @@
use strict;
use warnings;
-our $VERSION = '0.0600';
+our $VERSION = '0.0601';
BEGIN { __PACKAGE__->mk_accessors(qw/user store/) }
Modified: trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP.pm 2008-01-16 16:38:53 UTC (rev 7398)
+++ trunk/Catalyst-Plugin-Authentication-Store-LDAP/lib/Catalyst/Plugin/Authentication/Store/LDAP.pm 2008-01-16 17:29:13 UTC (rev 7399)
@@ -5,7 +5,7 @@
use strict;
use warnings;
-our $VERSION = '0.0600';
+our $VERSION = '0.0601';
use Catalyst::Plugin::Authentication::Store::LDAP::Backend;
@@ -111,7 +111,7 @@
)
);
-Settings in Config.yml
+Settings in Config.yml (adapt these to whatever configuration format you use):
# Config for Store::LDAP
authentication:
@@ -148,6 +148,14 @@
deref: always
+B<NOTE:> The settings above reflect the default values for OpenLDAP. If you
+are using Active Directory instead, Matija Grabnar suggests that the following
+tweeks to the example configuration will work:
+
+ user_basedn: ou=Domain Users,ou=Accounts,dc=mycompany,dc=com
+ user_field: samaccountname
+ user_filter: (sAMAccountName=%s)
+
=head2 ldap_server
This should be the hostname of your LDAP server.
Modified: trunk/Catalyst-Plugin-Authentication-Store-LDAP/t/01-pre_realms_api.t
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Store-LDAP/t/01-pre_realms_api.t 2008-01-16 16:38:53 UTC (rev 7398)
+++ trunk/Catalyst-Plugin-Authentication-Store-LDAP/t/01-pre_realms_api.t 2008-01-16 17:29:13 UTC (rev 7399)
@@ -10,6 +10,7 @@
my $back = Catalyst::Plugin::Authentication::Store::LDAP::Backend->new({
'ldap_server' => 'ldap.openldap.org',
+ #'ldap_server_options' => { timeout => -1 }, # can test the timeout SKIP with this
'binddn' => 'anonymous',
'bindpw' => 'dontcarehow',
'start_tls' => 0,
@@ -20,8 +21,18 @@
'use_roles' => 0,
});
isa_ok($back, "Catalyst::Plugin::Authentication::Store::LDAP::Backend");
-my $user = $back->get_user('kurt');
-isa_ok($user, "Catalyst::Plugin::Authentication::Store::LDAP::User");
-my $displayname = $user->displayname;
-cmp_ok($displayname, 'eq', 'Kurt Zeilenga', 'Should be Kurt Zeilenga');
+eval {
+ my $user = $back->get_user('kurt');
+ isa_ok($user, "Catalyst::Plugin::Authentication::Store::LDAP::User");
+ my $displayname = $user->displayname;
+ cmp_ok($displayname, 'eq', 'Kurt Zeilenga', 'Should be Kurt Zeilenga');
+};
+if ($@) {
+ if ($@ =~ m/timeout/i) {
+ SKIP: {
+ skip("LDAP connection timed out", 2);
+ }
+ }
+}
+
Modified: trunk/Catalyst-Plugin-Authentication-Store-LDAP/t/02-realms_api.t
===================================================================
--- trunk/Catalyst-Plugin-Authentication-Store-LDAP/t/02-realms_api.t 2008-01-16 16:38:53 UTC (rev 7398)
+++ trunk/Catalyst-Plugin-Authentication-Store-LDAP/t/02-realms_api.t 2008-01-16 17:29:13 UTC (rev 7399)
@@ -20,8 +20,20 @@
'use_roles' => 0,
}
);
-isa_ok( $back, "Catalyst::Plugin::Authentication::Store::LDAP::Backend" );
-my $user = $back->find_user( { username => 'kurt' } );
-isa_ok( $user, "Catalyst::Plugin::Authentication::Store::LDAP::User" );
-my $displayname = $user->displayname;
-cmp_ok( $displayname, 'eq', 'Kurt Zeilenga', 'Should be Kurt Zeilenga' );
+
+eval {
+ isa_ok( $back, "Catalyst::Plugin::Authentication::Store::LDAP::Backend" );
+ my $user = $back->find_user( { username => 'kurt' } );
+ isa_ok( $user, "Catalyst::Plugin::Authentication::Store::LDAP::User" );
+ my $displayname = $user->displayname;
+ cmp_ok( $displayname, 'eq', 'Kurt Zeilenga', 'Should be Kurt Zeilenga' );
+};
+
+if ($@) {
+ if ($@ =~ m/timeout/i) {
+ SKIP: {
+ skip("LDAP connection timed out", 3);
+ }
+ }
+}
+
More information about the Catalyst-commits
mailing list