简体   繁体   中英

How store windows auth information in database

I have an application in an intranet scenario: windows form, using wcf transport security and windows authentication ( using this pattern ). And I need to store windows users information and connect the windows user in my table "Person" (using Sql Server). But I have no idea what the best way to do this. Anyone can help me in a way to solve?

The best bet is to store the user's SID, this will never change for a given user, whereas the login name can be changed. If you can get to the WindowsIdentity for the user, the SID is in the User property.

您可能有一个表,其中存储Windows用户名和关联的“个人”条目。

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