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