Bug 17776: (QA follow-up) Remove shibboleth package variables
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 5 Oct 2018 08:19:14 +0000 (10:19 +0200)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 9 Oct 2018 15:02:50 +0000 (15:02 +0000)
commit4febf0656c202affa6aecba0241bfd13f89f19fd
tree807f90b2a35cc7bc0252454653beef484381eb3c
parent7ce770ddc5d4caed4abd7c3026ea18a1dfdfbbdd
Bug 17776: (QA follow-up) Remove shibboleth package variables

This is about $shib and $shib_login.
We move in the right direction by calling get_login_shib in
get_template_and_user and checkauth. In the same line we can do the
shib_ok check at that time (just checking cached values). This paves
the way for the third subroutine using the two package vars: checkpw.
Note that checkpw is also called outside Auth.pm. So I would be more
comfortable if we do the same calls like in checkauth and remove both
variables from the package level (especially under Plack of course).

The former changes actually justify a 'use C4::Auth_with_shibboleth'
instead of the current require and import.

Note: When calling checkpw from checkauth, we are calling get_login_shib
twice now. But the time involved for doing so is around zero (cache), so
not really an argument for extra parameters and complexer code.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Auth.pm
C4/Auth_with_shibboleth.pm