Remove ineffective FindBin and use lib

Our use of FindBin and use lib was not actually having any effect,
so remove it for now. It may be worth revisiting later.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Initial dummy auth endpoint

/api/auth.json

Returns a {token: "some fake token"} json value

Intended for POST, but also accepts GET values for now.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Rename patrons, add library cards

Rename some patrons to avoid everyone being John Q Public, add
mapping from library cards to users.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Auth by barcode, return user id, handle not-found

Use barcodes (and any password) to auth users, reutrn a user id in
the auth data, and return 404 when a user is not found.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Add CORS headers for wide-open access

Add CORS headers for wide-open access to facilitate testing.

This should be made configurable, and not wide-open by default.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Add password support to dummy driver

Add support for verification of passwords at auth time.

Each user has a password which is their first name, lowercase.

Plaintext passwords noted in comments next to each password hash.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Correct creds hash to use user id, not card

Correct the creds hash to use user id, and not the user's library
card number.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Fix user hash lookup

Fix user hash lookup, make more robust. We were failing open.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Add some summary data to users

Add some summary data to users:
 - number of checkouts
 - number of holds
 - balance owed

Signed-off-by: Jeff Godin <jgodin@tadl.org>