[Catalyst-commits] r6956 - trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Store

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Fri Oct 5 03:19:18 GMT 2007


Author: bricas
Date: 2007-10-05 03:19:18 +0100 (Fri, 05 Oct 2007)
New Revision: 6956

Added:
   trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Store/Null.pm
Log:
adding a null store for typekey and openid credentials. docs to come later.

Added: trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Store/Null.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Store/Null.pm	                        (rev 0)
+++ trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Store/Null.pm	2007-10-05 02:19:18 UTC (rev 6956)
@@ -0,0 +1,39 @@
+package Catalyst::Plugin::Authentication::Store::Null;
+
+use strict;
+use warnings;
+
+use Catalyst::Plugin::Authentication::User::Hash;
+
+use base qw( Class::Accessor::Fast );
+
+BEGIN {
+    __PACKAGE__->mk_accessors( qw( _config ) );
+}
+
+sub new {
+    my ( $class, $config, $app) = @_;
+    bless { _config => $config }, $class;
+}
+
+sub for_session {
+	my ( $self, $c, $user ) = @_;
+    return $user;
+}
+
+sub from_session {
+	my ( $self, $c, $user ) = @_;
+    return $user;
+}
+
+sub find_user {
+    my ( $self, $userinfo, $c ) = @_;
+    return bless $userinfo, 'Catalyst::Plugin::Authentication::User::Hash';
+}
+
+sub user_supports {
+    my $self = shift;
+    Catalyst::Plugin::Authentication::User::Hash->supports(@_);
+}
+
+1;




More information about the Catalyst-commits mailing list