View | Details | Raw Unified | Return to bug 12027
Collapse All | Expand All

(-)a/C4/Auth.pm (-5 / +3 lines)
Lines 800-808 sub checkauth { Link Here
800
            }
800
            }
801
801
802
            # If we are in a shibboleth session (shibboleth is enabled, a shibboleth match attribute is set and matches koha matchpoint)
802
            # If we are in a shibboleth session (shibboleth is enabled, a shibboleth match attribute is set and matches koha matchpoint)
803
            if ( $shib and $shib_login and $shibSuccess and $type eq 'opac' ) {
803
            if ( $shib and $shib_login and $shibSuccess) {
804
805
                # (Note: $type eq 'opac' condition should be removed when shibboleth authentication for intranet will be implemented)
806
                logout_shib($query);
804
                logout_shib($query);
807
            }
805
            }
808
        }
806
        }
Lines 887-894 sub checkauth { Link Here
887
885
888
            my ( $return, $cardnumber );
886
            my ( $return, $cardnumber );
889
887
890
            # If shib is enabled and we have a shib login, does the login match a valid koha user
888
    	    # If shib is enabled and we have a shib login, does the login match a valid koha user
891
            if ( $shib && $shib_login && $type eq 'opac' ) {
889
            if ( $shib && $shib_login ) {
892
                my $retuserid;
890
                my $retuserid;
893
891
894
                # Do not pass password here, else shib will not be checked in checkpw.
892
                # Do not pass password here, else shib will not be checked in checkpw.
(-)a/C4/Auth_with_shibboleth.pm (-2 / +11 lines)
Lines 49-54 sub shib_ok { Link Here
49
    return 0;
49
    return 0;
50
}
50
}
51
51
52
52
# Logout from Shibboleth
53
# Logout from Shibboleth
53
sub logout_shib {
54
sub logout_shib {
54
    my ($query) = @_;
55
    my ($query) = @_;
Lines 116-124 sub checkpw_shib { Link Here
116
sub _get_uri {
117
sub _get_uri {
117
118
118
    my $protocol = "https://";
119
    my $protocol = "https://";
120
    my $interface = C4::Context->interface;
121
    $debug and warn "shibboleth interface: " . $interface;
119
122
120
    my $return = $protocol . C4::Context->preference('OPACBaseURL');
123
    my $return;
121
    return $return;
124
    if ( $interface eq 'intranet' ) {
125
        $return = $protocol . C4::Context->preference('staffClientBaseURL');
126
        return $return;
127
    } else {
128
        $return = $protocol . C4::Context->preference('OPACBaseURL');
129
        return $return;
130
    }
122
}
131
}
123
132
124
sub _get_shib_config {
133
sub _get_shib_config {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt (-1 / +8 lines)
Lines 42-47 Link Here
42
<div id="login_error"><strong>Error: </strong>Invalid username or password</div>
42
<div id="login_error"><strong>Error: </strong>Invalid username or password</div>
43
[% END %]
43
[% END %]
44
44
45
[% IF (shibbolethAuthentication) %]
46
<!-- This is what is displayed if shib login has failed -->
47
[% IF (invalidShibLogin ) %]
48
<div id="login_error"><Strong>Error: </strong>Shibboleth login failed</div>
49
[% END %]
50
<p>If you have a shibboleth account, please <a href="[% shibbolethLoginUrl %]">click here</a> to login.</p>
51
[% END %]
52
45
<!-- login prompt time-->
53
<!-- login prompt time-->
46
<form action="[% url %]" method="post" name="loginform" id="loginform">
54
<form action="[% url %]" method="post" name="loginform" id="loginform">
47
    <input type="hidden" name="koha_login_context" value="intranet" />
55
    <input type="hidden" name="koha_login_context" value="intranet" />
48
- 

Return to bug 12027