sub handler {
my $apache = shift;
my $cgi = new CGI;
- my $auth_ses = $cgi->cookie('ses');
+ my $auth_ses = $cgi->cookie('ses') || $cgi->cookie('eg.auth.token');
+ if ($auth_ses =~ /^"(.+)"$/) {
+ $auth_ses = $1;
+ }
my $ws_ou = $cgi->cookie('ws_ou') || 1;
my $url = $cgi->url;
sub handler {
my $r = shift;
my $cgi = new CGI;
- my $auth_ses = $cgi->cookie('ses') || $cgi->param('ses');
+ my $auth_ses = $cgi->cookie('ses') || $cgi->param('ses') || $cgi->cookie('eg.auth.token');
+ if ($auth_ses =~ /^"(.+)"$/) {
+ $auth_ses = $1;
+ }
# find some IDs ...
my @xacts;
return Apache2::Const::NOT_FOUND;
}
if ($bucket->pub !~ /t|1/oi) {
- my $authid = $cgi->cookie('ses') || $cgi->param('ses');
+ my $authid = $cgi->cookie('ses') || $cgi->param('ses') || $cgi->cookie('eg.auth.token');
+ if ($authid =~ /^"(.+)"$/) {
+ $authid = $1;
+ }
my $auth = verify_login($authid);
if (!$auth) {
return 403;
my $queue_id = $cgi->param('queueid');
if ($queue_id) {
# check that we're logged in -- XXX necessary? conservative for now
- my $authid = $cgi->cookie('ses') || $cgi->param('ses');
+ my $authid = $cgi->cookie('ses') || $cgi->param('ses') || $cgi->cookie('eg.auth.token');
+ if ($authid =~ /^"(.+)"$/) {
+ $authid = $1;
+ }
my $auth = verify_login($authid);
if (!$auth) {
return 403;
sub handler {
my $r = shift;
my $cgi = new CGI;
- my $authid = $cgi->cookie('ses') || $cgi->param('ses');
+ my $authid = $cgi->cookie('ses') || $cgi->param('ses') || $cgi->cookie('eg.auth.token');
+ if ($authid =~ /^"(.+)"$/) {
+ $authid = $1;
+ }
my $user = $U->simplereq('open-ils.auth', 'open-ils.auth.session.retrieve', $authid);
if (!$user || (ref($user) eq 'HASH' && $user->{ilsevent} == 1001)) {
return Apache2::Const::FORBIDDEN;
return Apache2::Const::NOT_FOUND unless (@$perms);
my $cgi = new CGI;
- my $auth_ses = $cgi->cookie('ses') || $cgi->param('ses');
+ my $auth_ses = $cgi->cookie('ses') || $cgi->param('ses') || $cgi->cookie('eg.auth.token');
+ if ($auth_ses =~ /^"(.+)"$/) {
+ $auth_ses = $1;
+ }
my $ws_ou = $apache->dir_config('OILSProxyLoginOU') || $cgi->cookie('ws_ou') || $cgi->param('ws_ou');
my $url = $cgi->url;
my $user;
# if the user is not logged in via cookie, route them to the login page
- if(! ($user = verify_login($cgi->cookie("ses"))) ) {
+ my $auth_ses = $cgi->param('ses') || $cgi->cookie('ses') || $cgi->cookie('eg.auth.token');
+ if ($auth_ses =~ /^"(.+)"$/) { # came from eg2 login, is json encoded
+ $auth_ses = $1;
+ }
+
+ if(! ($user = verify_login($auth_ses)) ) {
$ttk = "login";
}
my $r = shift;
my $cgi = new CGI;
- my $auth = $cgi->param('ses') || $cgi->cookie('ses');
+ my $auth = $cgi->param('ses') || $cgi->cookie('ses') || $cgi->cookie('eg.auth.token');
+ if ($auth =~ /^"(.+)"$/) {
+ $auth = $1;
+ }
unless(verify_login($auth)) {
$logger->error("authentication failed on vandelay record import: $auth");
my $r = shift;
my $cgi = new CGI;
- my $auth = $cgi->param('ses') || $cgi->cookie('ses');
+ my $auth = $cgi->param('ses') || $cgi->cookie('ses') || $cgi->cookie('eg.auth.token');
+ if ($auth =~ /^"(.+)"$/) {
+ $auth = $1;
+ }
my $user = verify_login($auth);
my $perm_check = verify_permission($auth, $user, $user->ws_ou, ['UPLOAD_COVER_IMAGE']);