Database Authentication

From: Alphonse Giambrone (NOSPAMa-giam_at_example.invalid)
Date: 09/20/04


Date: Mon, 20 Sep 2004 10:08:28 -0400

I have seen many sample of code authenticating a user by querying a
database.
Some lookup against only the login and return the password which is then
compared to the user entered password in the application code. Something
like:
Select password from users where login = 'userlogin'
if password = enteredpassword then
    userisauthenticated.
end if

Others lookup against both. Something like:
Select UserID from users where login = 'userlogin' and password =
'enterpassword'
if not userid is null then
    userisauthenticated
end if

I would like to know the advantages/disadvantages of the two methods.
Possibly that some databases can't apply case sensitivity to a where clause
or something else?

TIA

-- 
Alphonse Giambrone
Email: a-giam at customdatasolutions dot us


Relevant Pages

  • Re: PDO: Switch database user without reopening connection
    ... At the bare minimum there will be a login user who only has ... modifications to the database as well (editors get update permission, ... As database connections are expensive to ... a certain visitor in the Session, and use that value to start the right ...
    (comp.lang.php)
  • Re: PDO: Switch database user without reopening connection
    ... At the bare minimum there will be a login user who only has ... the postgres user they are logged in as to one that can make ... modifications to the database as well (editors get update permission, ... As database connections are expensive to ...
    (comp.lang.php)
  • Re: Please! Doesnt anyone know a better way to do this?
    ... account, they need to automatically be directed to the page to enter data ... session variable on the Account page. ... I assume here that you're checking a database when the user attempts to ... When a new user attempts to login or clicks to register, ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: How to allow users to change their password?
    ... be set up to provide the Security dialog window for password changes. ... I'll have to login using their login ... > name/password first. ... See http://www.QBuilt.com for all your database needs. ...
    (microsoft.public.access.security)
  • Re: Enter user name, enter password, then press enter...
    ... What do you do when the customer asks that the database login in be the same ... username and password to use all of the stuff that she is permitted to use. ... I have implemented this type of security for Access, VB, and Web Based ASP ...
    (microsoft.public.access.forms)