I\'ve written a custom principal object which contains a few additional fields (email and userid in addition to the username).
In order to access these properties I have
When not authorized, you could set the user object to a specific instance of the custom principal with default values:
if (authCookie == null) { context.User = CustomPrincipal.Default; // Or CreateDefault() return; }