Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void Application_AuthenticateRequest(object sender, EventArgs e)
- {
- if (Request.IsAuthenticated)
- {
- // check if we have the user in the cache
- var userPrincipal = PrincipalManager.GetPrincipal();
- if (userPrincipal == null || !userPrincipal.Identity.IsAuthenticated)
- {
- userPrincipal = new GenericPrincipal(new RoomixerIdentity(), null);
- PrincipalManager.StorePrincipal(userPrincipal);
- }
- HttpContext.Current.User = userPrincipal;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement