Velocity Reviews

Velocity Reviews (
-   ASP .Net Security (
-   -   Directly Accessing a Principal Object (

Adam Getchell 03-31-2005 06:25 PM

Directly Accessing a Principal Object
I've writting an httpModule to handle our custom authentication process,
which uses site-wide kerberos.

Currently, this means that each and every page causes authentication to
occur. I'd like to short-circuit authentication if it's already happened by
using something like:

private void AuthenticateRequest(object requestObjectSender, EventArgs
if (!Thread.CurrentPrincipal.Identity.IsAuthenticated )
HttpApplication objectApplication = (HttpApplication)requestObjectSender;
HttpContext objectContext = (HttpContext)objectApplication.Context;

For this to work, I need to have my GenericPrinciple setup here:

objectContext.User = new GenericPrincipal(objectIdentity, stringRoles);

have its IsAuthenticated property set to true.

How would I do this? The article "Directly Accessing a Principal Object" in
the .NET Framework Developer's Guide doesn't explain this, as far as I can
tell. Are there other pointers?


All times are GMT. The time now is 08:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.