From: Tomas Doran Date: Mon, 16 Aug 2010 18:30:53 +0000 (+0000) Subject: More moves / cleanups X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ae1e3c5772de7b1aaf73eb9986ea231051550792;p=catagits%2FCatalyst-Authentication-Store-LDAP.git More moves / cleanups --- diff --git a/t/lib/Test-Session-Broken/lib/Test/LDAP.pm b/t/lib/Test-Session-Broken/lib/Test/LDAP.pm deleted file mode 100644 index 4eef8c8..0000000 --- a/t/lib/Test-Session-Broken/lib/Test/LDAP.pm +++ /dev/null @@ -1,69 +0,0 @@ -package Test::LDAP; -use Moose; -use namespace::autoclean; - -use Catalyst::Runtime 5.80; - -use Catalyst qw/ - -Debug - Authentication - Session - Session::State::Cookie - Session::Store::FastMmap -/; - -extends 'Catalyst'; - -our $VERSION = '0.01'; - -# Configure the application. -# -# Note that settings in test_ldap_web.conf (or other external -# configuration file that you set up manually) take precedence -# over this when using ConfigLoader. Thus configuration -# details given here can function as a default configuration, -# with an external configuration file acting as an override for -# local deployment. - -__PACKAGE__->config( - # Disable deprecated behavior needed by old applications - disable_component_resolution_regex_fallback => 1, - - authentication => { - default_realm => "ldap", - - realms => { - ldap => { - credential => { - "class" => "Password", - "password_field" => "password", - "password_type" => "self_check", - "password_hash_type" => "crypt", - }, - - "store" => { - "binddn" => "anonymous", - "bindpw" => "dontcare", - "class" => "LDAP", - "ldap_server" => "ldap.test.no", - "ldap_server_options" => { - "timeout" => 30, - "port" => "636", - "scheme" => "ldaps" - }, - "role_basedn" => "ou=stavanger,o=test,c=no", - "role_field" => "cn", - "role_filter" => "(&(objectClass=groupOfNames)(member=%s))", - "user_scope" => "one", - "user_search_options" => { - "deref" => "always" - } - } - } - } - } -); - -__PACKAGE__->setup(); - -1; diff --git a/t/lib/Test/LDAP.pm b/t/lib/Test/LDAP.pm new file mode 100644 index 0000000..ddb5174 --- /dev/null +++ b/t/lib/Test/LDAP.pm @@ -0,0 +1,53 @@ +package Test::LDAP; +use Moose; +use namespace::autoclean; + +use Catalyst::Runtime 5.80; + +use Catalyst qw/ + -Debug + Authentication + Session + Session::State::Cookie + Session::Store::FastMmap +/; + +extends 'Catalyst'; + +our $VERSION = '0.01'; + +__PACKAGE__->config( + # Disable deprecated behavior needed by old applications + disable_component_resolution_regex_fallback => 1, + + authentication => { + default_realm => "ldap", + + realms => { + ldap => { + credential => { + "class" => "Password", + "password_field" => "password", + "password_type" => "self_check", + "password_hash_type" => "crypt", + }, + + "store" => { + "binddn" => "anonymous", + "bindpw" => "dontcare", + "class" => "LDAP", + "ldap_server" => "localhost", + user_basedn => "ou=foobar", + "ldap_server_options" => { + "port" => "10636", + }, + "user_scope" => "one", + } + } + } + } +); + +__PACKAGE__->setup(); + +1; diff --git a/t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/Auth.pm b/t/lib/Test/LDAP/Controller/Auth.pm similarity index 94% rename from t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/Auth.pm rename to t/lib/Test/LDAP/Controller/Auth.pm index 7f937e5..905d7d1 100644 --- a/t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/Auth.pm +++ b/t/lib/Test/LDAP/Controller/Auth.pm @@ -4,12 +4,6 @@ use namespace::autoclean; BEGIN {extends 'Catalyst::Controller'; } -sub index :Path :Args(0) { - my ( $self, $c ) = @_; - - $c->res->body("Login"); -} - sub login :Path("login") :Args(0) { my ( $self, $c ) = @_; diff --git a/t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/Root.pm b/t/lib/Test/LDAP/Controller/Root.pm similarity index 100% rename from t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/Root.pm rename to t/lib/Test/LDAP/Controller/Root.pm diff --git a/t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/User.pm b/t/lib/Test/LDAP/Controller/User.pm similarity index 100% rename from t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/User.pm rename to t/lib/Test/LDAP/Controller/User.pm diff --git a/t/lib/Test-Session-Broken/lib/Test/LDAP/Model/LDAP.pm b/t/lib/Test/LDAP/Model/LDAP.pm similarity index 100% rename from t/lib/Test-Session-Broken/lib/Test/LDAP/Model/LDAP.pm rename to t/lib/Test/LDAP/Model/LDAP.pm