2011-06-05 36 views
5

我想在自定義FormsAuthentication方案中利用IIdentity.AuthenticationType屬性來設置我自己的值。使用開箱即用的FormsAuthentication,與HttpContext關聯的IIdentityAuthenticationType被設置爲「Forms」。IIdentity.AuthenticationType上的任何框架依賴關係?

任何人都可以驗證核心Asp.Net或Asp.Net MVC框架中是否有任何邏輯功能取決於HttpContext.Current.User.Identity.AuthenticationType == "Forms"

回答

6

使用反射器,我分析了IIdentity.AuthenticationTypeFormsIdentity.AuthenticationType的所有「Used By」依賴關係,並且沒有任何核心框架具有與AuthenticationType值相關的任何邏輯。