Received: from deborah.paradise.net.nz (deborah.paradise.net.nz [203.96.152.32]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBQ2qvm56899 for ; Tue, 25 Dec 2001 21:52:57 -0500 (EST) (envelope-from andrew@catalyst.net.nz) Received: from heidegger.catalyst.net.nz (203-96-145-117.adsl.paradise.net.nz [203.96.145.117]) by deborah.paradise.net.nz (Postfix) with ESMTP id BF195D1987; Wed, 26 Dec 2001 15:52:59 +1300 (NZDT) Received: from 127.0.0.1 (ident=unknown) by heidegger.catalyst.net.nz with esmtp (MasqMail 0.1.15) id 16J4Ap-4YD-00; Wed, 26 Dec 2001 15:52:07 +1300 Subject: Re: WWW-Authentication and Postgresql From: Andrew McMillan To: Stephan Borg Cc: pgsql-php@postgresql.org In-Reply-To: <000101c18d9b$40ea9fd0$1400a8c0@p1g> References: <000101c18d9b$40ea9fd0$1400a8c0@p1g> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0 (Preview Release) Date: 26 Dec 2001 15:52:06 +1300 Message-Id: <1009335127.28550.6.camel@kant.mcmillan.net.nz> Mime-Version: 1.0 X-Archive-Number: 200112/28 X-Sequence-Number: 803 On Wed, 2001-12-26 at 12:24, Stephan Borg wrote: > Hello there, > > I'm hoping that someone has tried this already. I am currently trying to > write code, that prompts the user with a www-authentication logon and > proceeds to verify if the credentials are a valid Postgresql user (incl > password) before proceeding. We have code to do this in the office somewhere. It isn't hard. Follow the PHP examples and try a connect to the database with the credentials you have got from the auth. I don't actually do this for any of my sites, however. I find that database user != system user in 99.9% of cases. In addition I find that the www-authentication method makes for a crude login process. E-mail me off-list if you can't figure it out and I will dig out the code for you. Cheers, Andrew. -- -------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Are you enrolled at http://schoolreunions.co.nz/ yet?