package Myproxy::Dump; use strict; use warnings; use CGI::Cookie (); use Apache2::Log (); use Apache2::RequestRec (); use APR::Table (); use Apache2::Const -compile => qw(OK); use constant X509_USER_PROXY => "X509_USER_PROXY"; sub handler { my $GLOBUS_LOCATION = "/usr/local/globus-4.0"; my $MYPROXY_SERVER = "click.ncsa.uiuc.edu"; # my $MYPROXY_EXTRA_PARAMS = "-p 7513"; my $MYPROXY_EXTRA_PARAMS = ""; my $r = shift; # ($package, $r) = $_; $r->content_type('text/html'); my %cookies = CGI::Cookie->fetch($r); my $cookies = %cookies; print qq(
logout clearlogin (via LocationMatch)
#[doesn't work] logout (via .htaccess)
#[doesn't work] logout redirect (via LocationMatch)
# my $user = $r->user(); print("Name | Path | Contents |
---|---|---|
$name | \n" ."$path | \n" ."$value | \n" ."
'
. "Found Granting Cookie\n"); if ($user ne '') { my $myproxy_command = "| $GLOBUS_LOCATION/bin/myproxy-logon" . " -s $MYPROXY_SERVER -l $user --stdin_pass" . " " . $MYPROXY_EXTRA_PARAMS . " >> /var/log/myproxy_out" . " 2>> /var/log/myproxy_err"; # print("Issuing myproxy command: $myproxy_command \n"); # my $opened = open(myproxy_handle, $myproxy_command); # if ($opened) { # # replace %20 with +, %2F with /, and %3D with = # $Value =~ s/ /\+/g; # $value =~ s/\%20/\+/g; # $value =~ s/\%2F/\//g; # $value =~ s/\%3D/=/g; # print myproxy_handle "$value\n"; # print("Sent password \n"); # print("$value\n"); # my $closed_success = close(myproxy_handle); # print(" Closed ($closed_success)? " # . ($closed_success ? "yes" : "no") . " \n"); # my $myproxy_exit = $?; # retval stored in $? by close() # print("Exit value = $myproxy_exit \n"); # } else { # print("Unable to run myproxy-logon: $! \n"); # } } else { print("No username found \n"); } print(" |
No cookies found.
\n"); } print("$key | \n$value |
$_[0] | \n$_[1] |
$_[0] | \n$_[1] |