Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Single authentication for multiple databases

Quote Reply
Single authentication for multiple databases
DBMan SQL description says that users can login to multiple databases with only one login authentication. How is this implemented?

In my application, users login to a first table which requires authentication of username & password to view.

A second table exists which also requires authentication to view if (per chance) it is accessed first.
I am of course using the same user table for both databases.

How do I allow a user who is consulting data from the first table to pass to the second table WITHOUT a further request for authentication? I suppose this relies on either session id or user name fields, but so far I do not understand how to do it.

I have not found the answer in these DBMan SQL help files or these fora. Thanks for any advice.

Charly
Quote Reply
Re: [charly] Single authentication for multiple databases In reply to
To be more precise on my previous question:
A search on my first database gives me a display list of records. One field of each record is clickable (giving me a number) and this number is used to call up a record from the second database - with no further login request. Thanks again in advance for any help.
Quote Reply
Re: [charly] Single authentication for multiple databases In reply to
You should make a link like:

<a href="db.cgi?db=second_database&do=search_results&foreign_key=<%primary_key_of_the_first_database%>&foreign_key-opt=="><%primary_key_of_the_first_database%><a>

foreign_key: should be the field name which will be related to the first database.

TheStone.

B.
Quote Reply
Re: [TheStone] Single authentication for multiple databases In reply to
Your suggested link is understood and implemented (with extra slash in ending </a>)
BUT... BUT...
second database brings up the login form with message:
'Invalid user or password'.
So something else is involved. Thanks for the follow up!
Charly
Quote Reply
Re: [charly] Single authentication for multiple databases In reply to
Double-checking, my fault! (user table not the same) So your advice and links works well. Thanks again for the help!
Charly