Nov 9, 2010 at 2:46 PM

I'm currently working on an authentication module for Orchard. My approach is to use the module to authenticate against our Identity Provider and then upon successful authentication, use the built-in FormsAuthentication mechanisms to setup the framework to work by calling FormsAuthenticationService.SignIn(IUser, bool).

I'm running into a problem with the WorkContext.CurrentUser value not being set. Searching through the source code I can only find where this value is being read but cannot find where it is being set.

Can someone help me figure out where WorkContext class members are being initialized, specifically the CurrentUser?

Thank you.

 - Matt

Nov 9, 2010 at 3:38 PM

Every IWorkContextStateProvider gets a shot at filling some part of the WorkContext. Take a look at Orchard.Security.CurrentUserWorkContext for CurrentUser.


Nov 9, 2010 at 4:58 PM

Thanks Nathan. That's what I was looking for.