Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Directly Accessing a Principal Object

Reply
Thread Tools

Directly Accessing a Principal Object

 
 
Adam Getchell
Guest
Posts: n/a
 
      03-31-2005
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,
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Principal Engineer/Sr. Principal Engineer padma C++ 3 10-05-2007 04:56 PM
Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'. adupuis@dublin.ie ASP .Net 2 08-31-2007 12:51 PM
Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'. kroyce@ups.edu ASP .Net Security 0 05-01-2007 01:50 PM
Preview image directly on PC, save directly to HD Patrick M. Digital Photography 3 01-07-2004 08:29 PM
Principal/Identity questions Craig Buchanan ASP .Net 1 12-03-2003 11:30 PM



Advertisments