3d188a946bd7bc926872c73d5a72c16cc2ab81b0
[catagits/Catalyst-Plugin-Authentication.git] / lib / Catalyst / Authentication / Realm / Compatibility.pm
1 package Catalyst::Authentication::Realm::Compatibility;
2
3 use strict;
4 use warnings;
5
6 use base qw/Catalyst::Authentication::Realm/;
7
8 ## very funky - the problem here is that we can't do real realm initialization
9 ## but we need a real realm object to function.  So - we kinda fake it - we 
10 ## create an empty object - 
11 sub new {
12     my ($class, $realmname, $config, $app) = @_;
13     
14     my $self = { config => $config };
15     bless $self, $class;
16     
17     $self->config->{'use_session'} = $app->config->{'Plugin::Authentication'}{'use_session'} || '1';
18     $self->name($realmname);
19     
20     return $self;
21 }
22
23 __PACKAGE__;
24
25 __END__
26
27 =pod
28
29 =head1 NAME
30
31 Catalyst::Authentication::Realm::Compatibility - Compatibility realm object
32
33 =head1 DESCRIPTION
34
35 An empty realm object for compatibility reasons.
36
37 =head1 METHODS
38
39 =head2 new( )
40
41 Returns a, basically empty, realm object.
42
43 =cut