跳至主要內容
OCLC Support

Library card number authentication

Many libraries uses library card numbers that are divided into fixed set of starting digits, followed by additional digits that identify a specific patron. Some database vendors consider it adequate to validate users by verifying that they provide library card numbers containing the correct starting digits, followed by the correct number of digits to make a valid library card number.

To authenticate based on a fixed set of starting digits, followed by additional digits, first try editing user.txt and adding a line like this:

     12345#######::checkdigit

Note: Changes to user.txt take effect immediately, with no need to restart EZproxy.

This line indicates that a library card number must start with 12345, and by followed by seven additional digits. The "::checkdigit" further requires that the last digit of the library card number must be the correct modulus 10 checkdigit, which is a very common checkdigit strategy used in library card numbers. You should try various library card numbers to see if they all pass validation. If they do not, then your library card numbers probably do not use the modulus 10 checkdigit, requiring that you change this line to:

     12345#######

All of your library card numbers should now match.

Some libraries have different starting prefixes, and batches of library card numbers of differing lengths. Under such circumstances, simple include two or more lines in user.txt to match every variation of your library card numbers.