By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 2,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

How to Implement Client-Project Adaptable User Authentication in Reusable Code Base

P: n/a
Hello,EveryBody!

I'm troubled by a design problem, Hoping that you'll save me out!

The Situation is:

We have two project of code A and B.A is our reusable code base, B is
for specified for our client;A has user authentication but based on
client's requirements.
Like:
For client B1:user authentication has membership information of
Company,Franchise.
But For client B2:membership information change to be Department,Team.

Both A and B will access membership information specified for client;It
may sounds not true that reusable A could access client(B) specified
information.The situation is:membership information is accessed by a
key, and A is used to do configurable query, the query condition is
specified by xml, in which membership key could be used.So A need to
access membership information by key, but A doesn't truly implement
it,because it is client-specified.Currently, I add a interface in A,
implement the client-specified in B, and suppose to dynamic load the
membership provider by read provider config and using reflection.

Then, the problem is out, Because A is refrenced By B, A can't refrence
B again, so the dynamic contructor invoke by reflection Can't works.

Could U give me some suggestion, for design or other.

Thanks Very Much!

Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Rhett" <rh******@mail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hello,EveryBody!

I'm troubled by a design problem, Hoping that you'll save me out!

The Situation is:

We have two project of code A and B.A is our reusable code base, B is
for specified for our client;A has user authentication but based on
client's requirements.
Like:
For client B1:user authentication has membership information of
Company,Franchise.
But For client B2:membership information change to be Department,Team.


Can the database queries be done either by stored procedures, or by
parameterized queries? In that case, A won't need to know the details of the
query. It will only need to set the parameter to the database primary key,
then execute the query.

A can then either process the query results in a generic manner (for
instance, by creating a name=value pair for each column it finds in the
query results if it doesn't already know about the column. This would allow
the query to return Department and Team, and A could create a string like
"Department=Accounting,Team=Payables".

Otherwise, you can have B1 and B2 derive from A. A method like
FetchAuthenticationData in A would execute the query, process the columns
which are always returned for all clients, then call a virtual method like
ProcessClientSpecificData, passing the query results. That method could do
whatever it wanted to do with the data.

John Saunders
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.