Catalyst::Authentication::Realm::Compatibility - Compatibility realm object


Catalyst-Plugin-Authentication documentation Contained in the Catalyst-Plugin-Authentication distribution.

Index


Code Index:

NAME

Top

Catalyst::Authentication::Realm::Compatibility - Compatibility realm object

DESCRIPTION

Top

An empty realm object for compatibility reasons.

METHODS

Top

new( )

Returns a, basically empty, realm object.


Catalyst-Plugin-Authentication documentation Contained in the Catalyst-Plugin-Authentication distribution.

package Catalyst::Authentication::Realm::Compatibility;

use strict;
use warnings;

use base qw/Catalyst::Authentication::Realm/;

## very funky - the problem here is that we can't do real realm initialization
## but we need a real realm object to function.  So - we kinda fake it - we 
## create an empty object - 
sub new {
    my ($class, $realmname, $config, $app) = @_;
    
    my $self = { config => $config };
    bless $self, $class;
    
    $self->config->{'use_session'} = $app->config->{'Plugin::Authentication'}{'use_session'} || '1';
    $self->name($realmname);
    
    return $self;
}

__PACKAGE__;

__END__