简体   繁体   中英

C#.NET MVC4 - Windows Authentication and custom user data

The client I work for at the moment wants to use their Active Directory logins with single sign-on when connecting from a domain computer. I have however no experience with Windows Authentication.

The problem however is, that I need to reference the users in the database. Also, the users already should be in the database even if they haven't logged on yet. (Guessing I'm syncing with active directory with LDAP every night??) The reason for that is that other users should be able to assign the user to specific tasks.

See the following basic diagram: 在此处输入图片说明

My question is:
Should I use a MemberShipProvider or just extend IPrincipal?
Am I thinking the right way by syncing every night?
How can I prevent the user data is fetched from the database every request?

使用成员资格提供程序为您连接到LDAP,然后使用提供程序中的ValidateUser方法进行身份验证。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM