Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Security (http://www.velocityreviews.com/forums/f62-asp-net-security.html)
-   -   Directly Accessing a Principal Object (http://www.velocityreviews.com/forums/t767306-directly-accessing-a-principal-object.html)

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
requestObjectEventArguments)
{
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?

Thanks,


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.