How can I get the IPrincipal for an Umbraco BackOffice user?
I'd like to manually assign the user for the current request from code.
For instance, consider an anonymous inbound request. If I caught that early in the lifecycle (like, BeginRequest via an HttpModule), I want to manually set the user as desired, like:
I have done this in other systems, so I know it's possible from a ASP.NET standpoint, but I'm struggling with how to get the IPrincipal in Umbraco to assign to HttpContext.Current.User.
Again, the code above will work if I can just get a valid IPrincipal from Umbraco.
How can I get the IPrincipal for an Umbraco BackOffice user?
I'd like to manually assign the user for the current request from code.
For instance, consider an anonymous inbound request. If I caught that early in the lifecycle (like,
BeginRequest
via an HttpModule), I want to manually set the user as desired, like:I have done this in other systems, so I know it's possible from a ASP.NET standpoint, but I'm struggling with how to get the
IPrincipal
in Umbraco to assign toHttpContext.Current.User
.Again, the code above will work if I can just get a valid
IPrincipal
from Umbraco.is working on a reply...