473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
1 1662
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: pokémon | last post by:
Ok, I want to implmement a "backgound process", but the catch is this: I want to control it via a Web Service, that is to say, the Web Service will be its API. What type of application should...
6
by: Andrus Moor | last post by:
I want to add a refresh button to my web page which works like browser refresh button: it must re-load current page from server. How to implement this in javascript ?
4
by: msnews.microsoft.com | last post by:
Hi All, If I want to deploy an C#+SQL2000 application to client site, does the client computer need to have SQL2000 server at all ? or the relevant database and tables will be collected during...
1
by: Celia Oblinger | last post by:
Please understand that I am not asking HOW to do something - but, rather, I just need some advise on what "technology" or method I should employ... The problem is this: I have a client for...
2
by: Martin Trabold | last post by:
Hi how can I implement a WindowsControl in IE? I know I can use the following statement in a web page. <object id="MyTrendingControl"...
1
by: Todd Beaulieu | last post by:
I need to return a reference of a server-side object to the client. I want that class to implement a custom interface (there will be a number of classes involved here and they will all support the...
6
by: dharmdeep | last post by:
Hi friends, I need to know as how can I implement Mutex in C. As I made a program in which more then one client access the same function at a time leading to memory related error. If u can help me...
2
by: adi | last post by:
Hi, I'm developing a webservice and a client application to consume it's services using v1.1 of the framework. I wonder what's the best way to crypt the communication between the webservice and...
1
by: Kat | last post by:
I have a gridview that queries a stored procedure to select id, firstname, lastname from clients. Then I have a detailsview that queries the client details linked to the id from the client...
52
by: Ben Voigt [C++ MVP] | last post by:
I get C:\Programming\LTM\devtools\UselessJunkForDissassembly\Class1.cs(360,27): error CS0535: 'UselessJunkForDissassembly.InvocableInternals' does not implement interface member...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.