Multi-bank Login Control

Asked

Viewed 244 times

2

Well, I have my application and every client will have his own database. As each customer will have their database, they will also have their user table for login.

So I have

Bancoempresa1 - User/Password: [email protected]/123

Bancoempresa2 - User/Password: [email protected]/123

So, I have my login screen with the following fields:

Login/Email: Password:

How will I know how to direct the correct bank to my user? that the user Vanessa type, go to their respective bank (Bancoempresa1) and not fall into another bank?

[Edit] Technology used: Asp.net MVC + Entity Framework

[Edit2] Each client will have its own database and these will be hosted on my server and in order to access the application, they must go through a single login screen that will also be on my server. Ex: www.sitedoRod.com/apps/login and then direct each user to their respective application and database.

1 answer

3


Without informing in a specific programming language, I will indicate ideas.

1st - MASTER logins table

One idea was to have a LOGIN table that is not part of any database, after validating whether the user exists or not, return from this login table, a field that contains the name of the database that this user will have access to, then use this name in all queries.

2nd - Inform Database

At login time, check the client’s application for a configuration file, containing the name of the database you should use. (Commonly used in ConnectionString or any appSettings)

3rd - Check bank by bank [do not recommend neeeeeeeeeeeeeeeeeeeeeem a little, but...]

At login time, check all server databases, if there is any login, log in, if not, return stating that the login is not valid

  • Asp.net MVC with Entity Framework is what I’m using

  • As I spoke to Vinicius below, at what point would I save in this table "login"? When each customer is registering a user for their system? And also in terms of security, I would have to keep this bank of mine open for all my clients?

  • Rod, do you intend to host all databases on one of your servers and your client will access your server? Or do you intend to have a single database that will serve for all clients? keep that database != of DATABASE SERVER

  • On your server, you will have a single database, or each client will have a database on its server?

  • My server, sql server. And each client will have its database

  • Each Client will have its application on its server or on its server, or will have something like www.sitedoRod.com/login for the customer to access his application?

  • will be in my, as you mentioned www.sitedorod.com/login is only login screen for all my customers

  • Then you will have to do the Master table, and at login time as quoted by @Vinicius also register in this table Master the User/Email data,Password,Bank and store this Bank information always in a Session for example and use it in all your queries to build the queryString of the connection with the bank

  • I thought to leave the login, and the bank path, when checking the login, connect to the bank and check the password there...what do you think? then I do not leave his password in this table "master"

  • It may be, but here comes another problem that is the possibility of duplicate logins for example username: joao.joazinho banco:emp1 and username:joao.joaozinho banco:emp2 and be two distinct users... hence you will have to really use something unique to ensure that this does not occur

  • but what if it’s by email?

  • email can be used, and even avoids this kind of problem, I just wanted to highlight something that could cause trouble if I wanted one username in place of a email

  • I get it, I think it was valid your answer, now I’ll have to test and see if there will be errors in this, rsrrs, thank you

Show 8 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.