Revision history for Perl extension Catalyst::Plugin::Authentication
+0.10018 29 Jul 2011
+ - Fix failing tests with the new PSGI Catalyst dev release
+
0.10017 24 Jan 2010
- Fix failing tests with the new PSGI Catalyst dev release
\B\.git\b
# Avoid Makemaker generated and utility files.
+\bMYMETA.yml$
\bMakefile$
\bblib
\bMakeMaker-\d
use Class::Inspector;
use Catalyst::Authentication::Realm;
-our $VERSION = "0.10017";
+our $VERSION = "0.10018";
sub set_authenticated {
my ( $c, $user, $realmname ) = @_;
use strict;
use warnings;
+use Test::More;
use Test::NoTabs;
all_perl_files_ok;
/;
use base qw/Catalyst/;
-__PACKAGE__->engine_class('RemoteTestEngine');
+unless ($Catalyst::VERSION >= 5.89000) {
+ __PACKAGE__->engine_class('RemoteTestEngine');
+}
__PACKAGE__->config(
'Plugin::Authentication' => {
default_realm => 'remote',
},
},
);
-
__PACKAGE__->setup;
+if ($Catalyst::VERSION >= 5.89000) {
+ require RemoteTestEngineRole;
+ RemoteTestEngineRole->meta->apply(__PACKAGE__->engine);
+}
1;
/;
use base qw/Catalyst/;
-__PACKAGE__->engine_class('RemoteTestEngine');
+unless ($Catalyst::VERSION >= 5.89000) {
+ __PACKAGE__->engine_class('RemoteTestEngine');
+}
__PACKAGE__->config(
'Plugin::Authentication' => {
default_realm => 'remote',
},
},
);
-
__PACKAGE__->setup;
+if ($Catalyst::VERSION >= 5.89000) {
+ require RemoteTestEngineRole;
+ RemoteTestEngineRole->meta->apply(__PACKAGE__->engine);
+}
1;
--- /dev/null
+package RemoteTestEngineRole;
+use Moose::Role;
+require Catalyst;
+
+around env => sub {
+ my ($orig, $self, @args) = @_;
+ my $e = $self->$orig(@args);
+
+ $e->{REMOTE_USER} = $RemoteTestEngine::REMOTE_USER;
+ $e->{SSL_CLIENT_S_DN} = $RemoteTestEngine::SSL_CLIENT_S_DN;
+ return $e;
+};
+
+1;
+