Users and session ids - Mailing list pgsql-novice

From C G
Subject Users and session ids
Date
Msg-id Law12-F52PM6LBBglhR000198ec@hotmail.com
Whole thread Raw
List pgsql-novice
Dear All,

After the great help I had with my managing users question, I have another
small question :) How should I incorparate session ids. My current scheme is
as follows:

1. A user logs into the database (through web, webservice, some other piece
of software)
2. We generate a random session key which will expire in 1 hour. Put this in
table (user, SessKey, time).
3. Give key to user.
4. User wants to do something else, so passes us the session key (cookie for
instance).
5. Should we now log onto the database a user 'nobody' who can only excute a
function which will change the user, e.g. Function = Set username to where
the session keys match.
6. Check the timestamp every so often to delete the sessionkey.

Is this right way of going about things?

Many thanks (again)

Colin

_________________________________________________________________
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband


pgsql-novice by date:

Previous
From: Andrew Kelly
Date:
Subject: Truncation on restore
Next
From: Tom Lane
Date:
Subject: Re: duplicate entries on primary key