The following technical note describes how EZproxy for Windows can be configured to use ODBC to connect to a Horizon databases to authenticate users. There is no equivalent version of this approach for the Linux version of EZproxy.
EZproxy for Windows supports authentication using ODBC which can be used to authenticate SirsiDynix Horizon borrowers. The following steps describe how to create this configuration.
Edit user.txt and add the following lines, changing somedsn to the DSN created in step 2, somedbuser and somedbpass to the username and password created in step 3, and somedatabase to the name of your Horizon database.
::ODBC DSN somedsn DBUser somedbuser DBPassword somedbpass SQL USE somedatabase Parameter User Parameter Pass SQL SELECT \ CASE WHEN expiration_date >= datediff(dd, '1/1/1970', getdate()) \ THEN 'allow' ELSE 'expired' END, 'Default', bb.bbarcode \ FROM borrower b, borrower_barcode bb \ WHERE \ b.borrower# = bb.borrower# AND \ bb.bbarcode = ? AND \ bb.lost_date IS NULL AND \ b.pin# = ? Expired; deny expired.htm /ODBC
Note that including the barcode as the third field returned by the select statement is ignored by EZproxy, but Sybase installations have found that this command will not work properly unless this extra field is included.
With this logic in place, EZproxy should test the username from the login form against authorized barcodes and the password against the pin field. If the information matches but the card is expired, the user will be sent the expired.htm file. If the information matches and the card is not expired, the user is granted access.
If you encounter any problems creating this configuration, contact OCLC Support for additional help.