adding a null store for typekey and openid credentials. docs to come later.
Brian Cassidy [Fri, 5 Oct 2007 02:19:18 +0000 (02:19 +0000)]
lib/Catalyst/Plugin/Authentication/Store/Null.pm [new file with mode: 0644]

diff --git a/lib/Catalyst/Plugin/Authentication/Store/Null.pm b/lib/Catalyst/Plugin/Authentication/Store/Null.pm
new file mode 100644 (file)
index 0000000..b4207ab
--- /dev/null
@@ -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;