File: RemoteTestData.pm

package info (click to toggle)
libcatalyst-plugin-authentication-perl 0.10024-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 508 kB
  • sloc: perl: 1,531; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 480 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package RemoteTestData;
use strict;
use warnings;

use Moose::Role;

if ($Catalyst::VERSION < 5.89000) {
    require RemoteTestEngine;
    around engine_class => sub { 'RemoteTestEngine' };
}

around psgi_app => sub {
    my ($orig, $self, @arg) = @_;
    my $app = $self->$orig(@arg);
    sub {
        my ($e) = @_;
        $e->{REMOTE_USER} = $RemoteTestEngine::REMOTE_USER;
        $e->{SSL_CLIENT_S_DN} = $RemoteTestEngine::SSL_CLIENT_S_DN;
        $app->($e);
    };
};

1;