Database authentication
georgedamonkey - October 4, 2007 - 18:25
| Project: | Z39.50/SRU Client |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hello,
I'm wondering what the zURL syntax is if the database you're trying to search requires authentication?
Thank you!

#1
I don't know any user/password protected database to test, but the usual is:
user:password@server:port/database
user:password@z3950.loc.gov:7090/Voyager
#2
As far as I can see in chapter 3.1 of "YAZ User’s Guide and Reference" ( http://www.indexdata.dk/yaz/doc/yaz.pdf ) the syntax is
user=<username>,password=<password>:<host>:<port>/<database>These credentials have to be separated from the URL and passed as options to function yaz_connect
as
mixed yaz_connect ( string zurl [, mixed options] )see http://www.php-resource.de/handbuch/function.yaz-connect.htm
#3
after having a first look at the sources I set up a patch to pass credentials as options.
But it needs to be cross checked by somebody!
It looks that user/password are accepted by "Deutsche Bibliothek" even when not receiving a valid result. But this might have a different reason. So please check the attached patch.
Deutsche Bibliothek (using SUTRS and UNIMARC as default):
user=gast,password=gast:z3950.dbf.ddb.de:210/iltis