Lines 25-30
use Koha::AuthUtils qw(get_script_name);
Link Here
|
25 |
use Koha::Database; |
25 |
use Koha::Database; |
26 |
use Carp; |
26 |
use Carp; |
27 |
use CGI; |
27 |
use CGI; |
|
|
28 |
use List::Util qw(any); |
28 |
|
29 |
|
29 |
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug); |
30 |
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug); |
30 |
|
31 |
|
Lines 80-88
sub get_login_shib {
Link Here
|
80 |
my $config = _get_shib_config(); |
81 |
my $config = _get_shib_config(); |
81 |
|
82 |
|
82 |
my $matchAttribute = $config->{mapping}->{ $config->{matchpoint} }->{is}; |
83 |
my $matchAttribute = $config->{mapping}->{ $config->{matchpoint} }->{is}; |
83 |
$debug and warn $matchAttribute . " value: " . $ENV{$matchAttribute}; |
|
|
84 |
|
84 |
|
85 |
return $ENV{$matchAttribute} || ''; |
85 |
if ( any { /(^psgi|^plack)/i } keys %ENV ) { |
|
|
86 |
$debug and warn $matchAttribute . " value: " . $ENV{"HTTP_".uc($matchAttribute)}; |
87 |
return $ENV{"HTTP_".uc($matchAttribute)} || ''; |
88 |
} else { |
89 |
$debug and warn $matchAttribute . " value: " . $ENV{$matchAttribute}; |
90 |
return $ENV{$matchAttribute} || ''; |
91 |
} |
86 |
} |
92 |
} |
87 |
|
93 |
|
88 |
# Checks for password correctness |
94 |
# Checks for password correctness |
Lines 217-227
Map their attributes to what you want to see in koha
Link Here
|
217 |
|
223 |
|
218 |
Tell apache that we wish to allow koha to authenticate via shibboleth. |
224 |
Tell apache that we wish to allow koha to authenticate via shibboleth. |
219 |
|
225 |
|
220 |
This is as simple as adding the below to your virtualhost config: |
226 |
This is as simple as adding the below to your virtualhost config (for CGI running): |
|
|
227 |
|
228 |
<Location /> |
229 |
AuthType shibboleth |
230 |
Require shibboleth |
231 |
</Location> |
232 |
|
233 |
Or (for Plack running): |
221 |
|
234 |
|
222 |
<Location /> |
235 |
<Location /> |
223 |
AuthType shibboleth |
236 |
AuthType shibboleth |
224 |
Require shibboleth |
237 |
Require shibboleth |
|
|
238 |
ShibUseEnvironment Off |
239 |
ShibUseHeaders On |
225 |
</Location> |
240 |
</Location> |
226 |
|
241 |
|
227 |
=item 5. |
242 |
=item 5. |
228 |
- |
|
|