开发者

How do you override the WCF AuthenticationService IsLoggedIn() method?

开发者 https://www.devze.com 2022-12-24 20:18 出处:网络
I have three current thoughts on how to do this: re-implement AuthenticationService, which uses lots of internal constructors and internal helpers,

I have three current thoughts on how to do this:

  1. re-implement AuthenticationService, which uses lots of internal constructors and internal helpers,
  2. implement custom IIdentity and IPrincipal types and somehow hook these into For开发者_如何学运维msAuthentication.
  3. give up and roll my own.

The problem is that we've got web apps and fat client apps using authentication and storing cookies. However, logging out of a web app does not log out of a fat client app, and we have now way of forcing a refreshed cookie, atm.


Found what I needed. Use number 2, implement my own IIdentity, and then implement the FormsAuthentication_OnAuthenticate on Global.asax [1].

[1] http://msdn.microsoft.com/en-us/library/system.web.security.formsauthenticationmodule.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消