X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FAuthentication%2FUser%2FHash.pm;h=7f530a1aaf10905108a57bf26bc7f5187d61cf73;hb=68c40c8b2ef5a414313cc96528f47827c98f3093;hp=edd6e2c9c76f471865eda83728d816caf6393d65;hpb=eb0cc5efbf3240a06defb9a2304fe96ce8fc5fc7;p=catagits%2FCatalyst-Plugin-Authentication.git diff --git a/lib/Catalyst/Plugin/Authentication/User/Hash.pm b/lib/Catalyst/Plugin/Authentication/User/Hash.pm index edd6e2c..7f530a1 100644 --- a/lib/Catalyst/Plugin/Authentication/User/Hash.pm +++ b/lib/Catalyst/Plugin/Authentication/User/Hash.pm @@ -1,5 +1,3 @@ -#!/usr/bin/perl - package Catalyst::Plugin::Authentication::User::Hash; use base qw/Catalyst::Plugin::Authentication::User/; @@ -19,15 +17,19 @@ sub AUTOLOAD { $self->_accessor( $key, @_ ); } +# this class effectively handles any method calls +sub can { 1 } + sub id { my $self = shift; $self->_accessor( "id", @_ ); } -sub store { - my $self = shift; - $self->_accessor( "store", @_ ) || ref $self; -} +## deprecated. Let the base class handle this. +# sub store { +# my $self = shift; +# $self->_accessor( "store", @_ ) || ref $self; +# } sub _accessor { my $self = shift; @@ -44,6 +46,7 @@ sub _accessor { : $data; } +## password portion of this is no longer necessary, but here for backwards compatibility. my %features = ( password => { clear => ["password"], @@ -85,7 +88,8 @@ sub supports { sub for_session { my $self = shift; - return $self->store && $self->id || $self; # if we have a store and an ID we serialize by ref, otherwise we serialize the whole user + + return $self; # we serialize the whole user } sub from_session {