[Catalyst-commits] r8662 - in trunk/Catalyst-Plugin-Authentication: . lib/Catalyst/Authentication/Realm lib/Catalyst/Plugin

jayk at dev.catalyst.perl.org jayk at dev.catalyst.perl.org
Thu Nov 27 23:49:56 GMT 2008


Author: jayk
Date: 2008-11-27 23:49:56 +0000 (Thu, 27 Nov 2008)
New Revision: 8662

Modified:
   trunk/Catalyst-Plugin-Authentication/Changes
   trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Authentication/Realm/Progressive.pm
   trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication.pm
Log:
adding progressive realm. planning for launch

Modified: trunk/Catalyst-Plugin-Authentication/Changes
===================================================================
--- trunk/Catalyst-Plugin-Authentication/Changes	2008-11-27 23:39:31 UTC (rev 8661)
+++ trunk/Catalyst-Plugin-Authentication/Changes	2008-11-27 23:49:56 UTC (rev 8662)
@@ -1,6 +1,10 @@
 Revision history for Perl extension Catalyst::Plugin::Authentication
 
-0.10007 2008-10-23
+0.10009 2008-11-27
+        - Including progressive realm for multiple authentication attempts
+          in a single request.
+
+0.10008 2008-10-23
 		- Updating config to allow for inclusion of realm ref's in the main
 		  config hash rather than in a subref called 'realms'
 

Modified: trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Authentication/Realm/Progressive.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Authentication/Realm/Progressive.pm	2008-11-27 23:39:31 UTC (rev 8661)
+++ trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Authentication/Realm/Progressive.pm	2008-11-27 23:49:56 UTC (rev 8662)
@@ -12,13 +12,18 @@
 
 =head1 SYNOPSIS
 
-This Realm allows an application to be built so that multiple realms are 
-supported and tried incrementally until a successful authentication.
+This Realm allows an application to use a single authenticate() call during
+which multiple realms are used and tried incrementally until one performs 
+a successful authentication is accomplished. 
 
-A simple use case is a Temporary Password that looks and acts exactly as a 
-regular password.  Without changing the authentication code, you can 
+A simple use case is a Temporary Password that looks and acts exactly as a
+regular password. Without changing the authentication code, you can
 authenticate against multiple realms.
 
+Another use might be to support a legacy website authentication system, trying
+the current auth system first, and upon failure, attempting authentication against
+the legacy system.
+
 =head2 EXAMPLE
 
 If your application has multiple realms to authenticate, such as a temporary
@@ -36,8 +41,8 @@
                 # Modify the authinfo passed into authenticate by merging
                 # these hashes into the realm's authenticate call:
                 authinfo_munge => {
-                    'local'     => { 'realm' => 'normal' },
-                    'temp'      => { 'realm' => 'temp' },
+                    'local'     => { 'type' => 'normal' },
+                    'temp'      => { 'type' => 'temporary' },
                 }
             },
             'normal' => {
@@ -74,7 +79,7 @@
 you just have to do a simple authenticate call:
 
  if ( $c->authenticate({ id => $username, password => $password }) ) {
-     if ( $c->user->realm eq 'temp' ) {
+     if ( $c->user->type eq 'temporary' ) {
          # Force user to change password
      }
  }

Modified: trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication.pm	2008-11-27 23:39:31 UTC (rev 8661)
+++ trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication.pm	2008-11-27 23:49:56 UTC (rev 8662)
@@ -13,7 +13,7 @@
 use Class::Inspector;
 use Catalyst::Authentication::Realm;
 
-our $VERSION = "0.10008";
+our $VERSION = "0.10009";
 
 sub set_authenticated {
     my ( $c, $user, $realmname ) = @_;




More information about the Catalyst-commits mailing list