ASP.NET 中基于角色的窗体身份验证的研究

基本概念:

IPrincipal:定义用户对象的基本功能

实现者:

GenericPrinciple 类
属性:
    Identity: GenericIdentity
方法:
    IsInRole()

WindowsPrincipal 类

GenericIdentity 类:
表示一般用户。代表特定用户的标识对象,代码当前即以该用户的名义运行。
属性:
    AuthenticationType: 获取用于标识用户的身份验证的类型。
    IsAuthenticated: 指示是否验证了用户。
    Name: 获取用户的名称。


IIdentity 接口:
定义标识对象的基本功能。

实现者:
    FormsIdentity
    GenericIdentity
    PassportIdentity
    WindowsIdentity

关于实现方法的一些参考文章:

Role-based Security with Forms Authentication
http://www.codeproject.com/aspnet/formsroleauth.asp

Efficient Role-based Authentication in ASP.NET
http://www.pluralsight.com/articlecontent/efficientRoleBasedAuthentication.pdf

Cookieless ASP.NET forms authentication
http://www.codeproject.com/aspnet/cookieless.asp

Forms Authentication Tutorial
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=85

Using Forms Authentication in ASP.NET
http://www.4guysfromrolla.com/webtech/110701-1.shtml

Using Forms Authentication in ASP.NET - Part 1
http://www.15seconds.com/issue/020220.htm

原文地址:https://www.cnblogs.com/RChen/p/308965.html