|
Lines 1155-1160
sub checkauth {
Link Here
|
| 1155 |
$session->param( 'emailaddress', $emailaddress ); |
1155 |
$session->param( 'emailaddress', $emailaddress ); |
| 1156 |
$session->param( 'ip', $session->remote_addr() ); |
1156 |
$session->param( 'ip', $session->remote_addr() ); |
| 1157 |
$session->param( 'lasttime', time() ); |
1157 |
$session->param( 'lasttime', time() ); |
|
|
1158 |
$session->param( 'interface', $type); |
| 1158 |
$session->param( 'shibboleth', $shibSuccess ); |
1159 |
$session->param( 'shibboleth', $shibSuccess ); |
| 1159 |
$debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map { $session->param($_) } qw(cardnumber firstname surname branch); |
1160 |
$debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map { $session->param($_) } qw(cardnumber firstname surname branch); |
| 1160 |
} |
1161 |
} |
|
Lines 1180-1185
sub checkauth {
Link Here
|
| 1180 |
$session->param( 'lasttime', time() ); |
1181 |
$session->param( 'lasttime', time() ); |
| 1181 |
$session->param( 'ip', $session->remote_addr() ); |
1182 |
$session->param( 'ip', $session->remote_addr() ); |
| 1182 |
$session->param( 'sessiontype', 'anon' ); |
1183 |
$session->param( 'sessiontype', 'anon' ); |
|
|
1184 |
$session->param( 'interface', $type); |
| 1183 |
} |
1185 |
} |
| 1184 |
} # END if ( $q_userid |
1186 |
} # END if ( $q_userid |
| 1185 |
elsif ( $type eq "opac" ) { |
1187 |
elsif ( $type eq "opac" ) { |
|
Lines 1192-1197
sub checkauth {
Link Here
|
| 1192 |
$session->param( 'ip', $session->remote_addr() ); |
1194 |
$session->param( 'ip', $session->remote_addr() ); |
| 1193 |
$session->param( 'lasttime', time() ); |
1195 |
$session->param( 'lasttime', time() ); |
| 1194 |
$session->param( 'sessiontype', 'anon' ); |
1196 |
$session->param( 'sessiontype', 'anon' ); |
|
|
1197 |
$session->param( 'interface', $type); |
| 1195 |
} |
1198 |
} |
| 1196 |
} # END unless ($userid) |
1199 |
} # END unless ($userid) |
| 1197 |
|
1200 |
|
|
Lines 1427-1432
sub check_api_auth {
Link Here
|
| 1427 |
my $session = get_session($sessionID); |
1430 |
my $session = get_session($sessionID); |
| 1428 |
C4::Context->_new_userenv($sessionID); |
1431 |
C4::Context->_new_userenv($sessionID); |
| 1429 |
if ($session) { |
1432 |
if ($session) { |
|
|
1433 |
C4::Context->interface($session->param('interface')); |
| 1430 |
C4::Context->set_userenv( |
1434 |
C4::Context->set_userenv( |
| 1431 |
$session->param('number'), $session->param('id'), |
1435 |
$session->param('number'), $session->param('id'), |
| 1432 |
$session->param('cardnumber'), $session->param('firstname'), |
1436 |
$session->param('cardnumber'), $session->param('firstname'), |
|
Lines 1585-1590
sub check_api_auth {
Link Here
|
| 1585 |
$session->param( 'emailaddress', $emailaddress ); |
1589 |
$session->param( 'emailaddress', $emailaddress ); |
| 1586 |
$session->param( 'ip', $session->remote_addr() ); |
1590 |
$session->param( 'ip', $session->remote_addr() ); |
| 1587 |
$session->param( 'lasttime', time() ); |
1591 |
$session->param( 'lasttime', time() ); |
|
|
1592 |
$session->param( 'interface', 'api' ); |
| 1588 |
} |
1593 |
} |
| 1589 |
$session->param( 'cas_ticket', $cas_ticket); |
1594 |
$session->param( 'cas_ticket', $cas_ticket); |
| 1590 |
C4::Context->set_userenv( |
1595 |
C4::Context->set_userenv( |
|
Lines 1674-1679
sub check_cookie_auth {
Link Here
|
| 1674 |
my $session = get_session($sessionID); |
1679 |
my $session = get_session($sessionID); |
| 1675 |
C4::Context->_new_userenv($sessionID); |
1680 |
C4::Context->_new_userenv($sessionID); |
| 1676 |
if ($session) { |
1681 |
if ($session) { |
|
|
1682 |
C4::Context->interface($session->param('interface')); |
| 1677 |
C4::Context->set_userenv( |
1683 |
C4::Context->set_userenv( |
| 1678 |
$session->param('number'), $session->param('id'), |
1684 |
$session->param('number'), $session->param('id'), |
| 1679 |
$session->param('cardnumber'), $session->param('firstname'), |
1685 |
$session->param('cardnumber'), $session->param('firstname'), |