Hi! Thanks för your reply. It seems my problem with autocreate is that the config isn't properly read. The <autocreate> tag seems undefined when checking if it is set.
I'll have to look into some more. /Björn -------- Originalmeddelande -------- Från: Matthias Meusburger <[email protected]> Datum: 2017-12-20 11:49 (GMT+01:00) Till: "[email protected] >> Koha" <[email protected]> Rubrik: Re: [Koha] Shibboleth authenticationa and autocreation Hi, I've only used it matching userid, but reading the code, I assume you can use any unique borrower field to match. Patron auto-creation works for me, using the same kind of configuration you have, but I had to replace %borrower = AddMember_Auto( %borrower ); with %borrower = C4::Members::AddMember_Auto( %borrower ); in the _autocreate function in C4/Auth_with_shibboleth.pm on one of my koha instances, for what it's worth. You should activate debug (at least in C4/Auth_with_shibboleth.pm) in order to see what's happening. Le 20/12/2017 à 09:51, Björn Nylén a écrit : > Hello! > > I'm trying to set up shibboleth authentication (and provisioning) in Koha > 17.11.00 and experience some issues. > > Firstly the matchpoint: Matching on userid works but is it possible to match > on other fields? We may want to use eg the "sort1" field if it's possible. > The lookup code reads: > Koha::Database->new()->schema()->resultset('Borrower') > ->find( { $config->{matchpoint} => $match } ); > Not sure if it's only possible to match against userid and other formally > unique fields? > > Secondly I tried to auto-create a patron if there's no match but I can't get > it to work. Any tips? Looking at the code it looks there should be an > <autocreate> tag to enable it, also it seems fixed values should go under a > "content"-attribute. > > My Shibboleth-config below: > > <useshibboleth>1</useshibboleth><!-- see C4::Auth_with_shibboleth for extra > configs you must do to turn this on --> > <shibboleth> > <autocreate>1</autocreate> > <matchpoint>userid</matchpoint> <!-- koha borrowers field to match > against for authentication --> > <mapping> > <userid is="uid"></userid> > <!-- mapping between koha borrowers field > and shibboleth attribute name --> > <surname is="sn"></surname> > <firstname is="givenName"></firstname> > <branchcode content="10"></branchcode> > <address is="street"></address> > <city is="l"></city> > <email is="mail"></email> > <categorycode content="NL"></categorycode> > </mapping> > </shibboleth> > > I'll appreciate any input! > > Björn Nylén > Systems Librarian > Lund University Library > [email protected]<mailto:[email protected]> > > > > Björn Nylén > Systembibliotekarie > Avdelningen för IT och Support > Universitetsbiblioteket, Lunds Universitet > [email protected]<mailto:[email protected]> > 046-2223198 > > _______________________________________________ > Koha mailing list http://koha-community.org > [email protected] > https://lists.katipo.co.nz/mailman/listinfo/koha > _______________________________________________ Koha mailing list http://koha-community.org [email protected] https://lists.katipo.co.nz/mailman/listinfo/koha _______________________________________________ Koha mailing list http://koha-community.org [email protected] https://lists.katipo.co.nz/mailman/listinfo/koha

