What is a good database schema for forms using OpenId?

I am trying to find a good standard for a database schema that will allow me to do a couple of things. Basically, I am writing a web application that should handle various types of logins. The first is the standard ASP Application Services account, the second is the OpenId / oAuth login, and the third is the Active Directory accounts.

What is a good suggestion for a data scheme that processes most of them? I plan to use DotNetOpenAuth for oAuth and OpenId. I already know how to get all these elements working individually, but I'm trying to find a way to make them without hacking, to bind them all together.

The application must also manage various permissions based on these users. Basically, if there is an Administrator group, then the user can add an AD account, an OpenId account or a Forms Auth account to it, and the application can check permissions at the page or method level (using MVC).

Open to suggestions?

EDIT: Since I have no suggestions, I will try to clear. Basically, if I get an identifier (say, either an OpenId user key, oAuth user key, or an AD domain / user), how can I associate this with a standard ASP ASP profile / user? Should I create a new membership user with a random password and associate the OpenId / oAuth / AD account with the profile through the properties?

Basically, I'm looking for something similar to this site. The user is registered through something, a profile is created, something is stored so that we know what it is. Essentially, I just need an idea how to get all these authentication methods to work together.

Thank!

+3
source share
1 answer

It is clear that I will try to explain what I did to solve this problem.

At first I decided to overturn the standard ASP Sql Services tables, for this I created my own tables User, AuthenticationServices and AuthenticationServicesUsers.

asp_Users asp_Membership. AuthenticationServices - , , , (, Facebook, MySpace, MyOpenId, Google ..)

, , , , AuthenticationServicesUsers, UserId AuthenticationServiceId.

SqlMembershipProvider, . , , CreateUser, , .

, . , MembershipUsers, , , .

, !

0

Source: https://habr.com/ru/post/1771015/


All Articles