File: RemoteTestEngine.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 (30 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package RemoteTestEngine;
BEGIN {
  require Catalyst;
  if ($Catalyst::VERSION >= 5.89000) {
    require Catalyst::Engine;
    @ISA = qw(Catalyst::Engine);
  } else {
    require Catalyst::Engine::CGI;
    @ISA = qw(Catalyst::Engine::CGI);
  }
}

our $REMOTE_USER;
our $SSL_CLIENT_S_DN;

sub env {
    my $self = shift;
    my %e;
    if ($Catalyst::VERSION >= 5.89000) {
      %e = %{ $self->SUPER::env() };
    } else {
      %e = %ENV;
    }

    $e{REMOTE_USER} = $REMOTE_USER;
    $e{SSL_CLIENT_S_DN} = $SSL_CLIENT_S_DN;
    return \%e;    
};

1;