Moving AuthRealmTestApp.pm to proper directory
[catagits/Catalyst-Plugin-Authentication.git] / lib / Catalyst / Plugin / Authentication.pm
index 7e2f917..62320c6 100644 (file)
@@ -40,6 +40,7 @@ sub set_authenticated {
         $c->save_user_in_session($user, $realmname);
     }
     $user->auth_realm($realmname);
+    $user->store(ref($c->auth_realms->{$realmname}{'store'}));
     
     $c->NEXT::set_authenticated($user, $realmname);
 }
@@ -167,6 +168,10 @@ sub auth_restore_user {
     
     # this sets the realm the user originated in.
     $user->auth_realm($realmname);
+    ## compatibility - some pre 0.10 store / credentials may need the store name,
+    ## this is not used by the current api in any form.
+    $user->store(ref($c->auth_realms->{$realmname}{'store'}));
+    
     return $user;
 
 }