Configuring EZproxy to gain information from multiple sources
From WCN
It might be necessary to use more than one source to construct a usable userObject. It is possible to configure the EZproxy "user.txt" file to account for such scenarios. This example also requires the create of a secondary file called "iii.txt" which will be called to perform specific III API information harvesting.
This combination mainly works with III, LDAP, and SIP, as those are the most robust sources of data.
So it is possible to do field swapping as necessary to make sure that the userObject that is returned has the "UID" set to how the user is known in both the local ILS system and in the NRE database (these data must match).
::LDAP BindUser CN=ezproxy,CN=users,DC=yourlib,DC=org BindPassword verysecret URL ldap://ldapserv.yourlib.org/CN=users,DC=yourlib,DC=org?sAMAccountName?sub?(objectClass=person)
IfUnauthenticated; Stop
If auth:barcode ne "" {
# preserve provided login username
Set saveuser = login:user
# and switch to barcode from LDAP
Set login:user = auth:barcode
# Make a call to the external "iii.txt" file
If UserFile("iii.txt") {
# Logic to perform if III authenticated was successful as well
}
# switch back to provided username
Set login:user = saveuser
}
/LDAP
Create a file called "iii.txt" and enter the contents below
::III Password None III iii.yourlib.org IfUnauthenticated; Stop
Set session:uid = login:user Set ParseName(auth:pn, "S,FM,X", "session") /III
