adding a null store for typekey and openid credentials. docs to come later.
[catagits/Catalyst-Plugin-Authentication.git] / lib / Catalyst / Plugin / Authentication / Store / Null.pm
1 package Catalyst::Plugin::Authentication::Store::Null;
2
3 use strict;
4 use warnings;
5
6 use Catalyst::Plugin::Authentication::User::Hash;
7
8 use base qw( Class::Accessor::Fast );
9
10 BEGIN {
11     __PACKAGE__->mk_accessors( qw( _config ) );
12 }
13
14 sub new {
15     my ( $class, $config, $app) = @_;
16     bless { _config => $config }, $class;
17 }
18
19 sub for_session {
20         my ( $self, $c, $user ) = @_;
21     return $user;
22 }
23
24 sub from_session {
25         my ( $self, $c, $user ) = @_;
26     return $user;
27 }
28
29 sub find_user {
30     my ( $self, $userinfo, $c ) = @_;
31     return bless $userinfo, 'Catalyst::Plugin::Authentication::User::Hash';
32 }
33
34 sub user_supports {
35     my $self = shift;
36     Catalyst::Plugin::Authentication::User::Hash->supports(@_);
37 }
38
39 1;