[Catalyst-commits] r7664 - / trunk/examples/NewAuthApp trunk/examples/NewAuthApp/t

zarquon at dev.catalyst.perl.org zarquon at dev.catalyst.perl.org
Thu May 1 02:25:57 BST 2008


Author: zarquon
Date: 2008-05-01 02:25:56 +0100 (Thu, 01 May 2008)
New Revision: 7664

Modified:
   /
   trunk/examples/NewAuthApp/README
   trunk/examples/NewAuthApp/newauthapp_dbic_store.conf
   trunk/examples/NewAuthApp/t/controller_Auth.t
Log:
 r13025 at zaphod:  kd | 2008-05-01 11:25:21 +1000
 working example with a README file



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:13019
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
   + 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:13025
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909

Modified: trunk/examples/NewAuthApp/README
===================================================================
--- trunk/examples/NewAuthApp/README	2008-05-01 00:52:30 UTC (rev 7663)
+++ trunk/examples/NewAuthApp/README	2008-05-01 01:25:56 UTC (rev 7664)
@@ -1 +1,19 @@
-Run script/newauthapp_server.pl to test the application.
+This application provides an environment with which to configure and
+test authentication stores for the "New" authentication API ( versions
+>= 0.1).
+
+At present, there is a config file for the Minimal store, and for the
+DBIx::Class store.  To use either of these make a symbolic link of the
+config file you want to test to myauthapp.conf and then run prove -l
+t.  As far as I know the test coverage is complete.
+
+The authentication/authorization database schema is based on the
+schema in Catalyst::Authentication::Store::DBIx::Class.
+
+TODO
+====
+
+* Write config files for more auth stores (especially OPENID)
+* Write a script to $schema->deploy to another DSN (or even an sql
+  file of the right syntax)
+

Modified: trunk/examples/NewAuthApp/newauthapp_dbic_store.conf
===================================================================
--- trunk/examples/NewAuthApp/newauthapp_dbic_store.conf	2008-05-01 00:52:30 UTC (rev 7663)
+++ trunk/examples/NewAuthApp/newauthapp_dbic_store.conf	2008-05-01 01:25:56 UTC (rev 7664)
@@ -1,8 +1,8 @@
 name NewAuthApp
 admin me at example.com
 <authentication>
-  <realms>
     default_realm  users
+<realms>
     <users>
       <credential>
         password_field   password
@@ -10,7 +10,7 @@
         class   Password
       </credential>
       <store>
-        role_column   roles
+        role_column   role_text
         class   DBIx::Class
         user_class  AuthSchema::User
       </store>

Modified: trunk/examples/NewAuthApp/t/controller_Auth.t
===================================================================
--- trunk/examples/NewAuthApp/t/controller_Auth.t	2008-05-01 00:52:30 UTC (rev 7663)
+++ trunk/examples/NewAuthApp/t/controller_Auth.t	2008-05-01 01:25:56 UTC (rev 7664)
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use Test::More tests => 8;
+use Test::More tests => 9;
 
 BEGIN { use_ok 'Test::WWW::Mechanize::Catalyst', 'NewAuthApp' }
 BEGIN { use_ok 'NewAuthApp::Controller::Auth' }
@@ -24,4 +24,5 @@
                     },
                 );
 $mech->content_contains('Invalid user and/or password', 'not logged in');
-
+$mech->get('http://localhost/auth/login?dudusername=joeuser&dudpassword=hackme');
+$mech->content_contains('invalid form input', 'dud form input barfs');




More information about the Catalyst-commits mailing list