Re: Implementing my own Windows Authentication module.
From: Brad (bh_10_2000@yahoo.com)
Date: 02/17/03
- Next message: Joe Kaplan: "Re: VB .Net Security Question"
- Previous message: Tom: "Clear SSL state"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Brad" <bh_10_2000@yahoo.com> Date: Mon, 17 Feb 2003 10:45:49 -0600
I'm trying to figure out what the "app" is referring to in the code below.
Anybody got an ideal?
"Anthony K. Song" <aksong@yahoo.com> wrote in message
news:Os$zISmpCHA.1628@TK2MSFTNGP12...
> You're gonna like this one....
>
> try this in your custom authentication module:
>
> IntPtr userToken =
>
((HttpWorkerRequest)((IServiceProvider)app.Context).GetService(typeof(HttpWo
> rkerRequest))).GetUserToken();
>
> WindowsIdentity winIdentity = new WindowsIdentity(userToken);
>
> and there you have your windows authenticated user.
>
>
>
> "Arnaud PICHERY" <aranud@ifrance.com> wrote in message
> news:#BKM625fCHA.1848@tkmsftngp10...
> > Hi !
> >
> > I need to create my own authentication module to
> > handle both the Form authentication and the Windows
> > authentication (Users without the proper windows
> > credentials will be redirected to a logon page and
> > will have to enter some alternate credentials using
> > a login/password validated by a form-like authentication
> > mechanism).
> >
> > So far I have been able to create the form authentication
> > part without too much troubles, but the windows
> > authentication part is a little more tricky.
> >
> > Basically what I miss is the user token found in the
> > request to create a WindowsIdentity object. I know that
> > the Windows authentication module provided by microsoft
> > does that by accessing an internal HttpWorkerRequest
> > object and getting the user token by calling
> > HttpWorkerRequest.GetUserToken(). Unfortunately I can
> > access the internal HttpWorkerRequest object.
> >
> > Any idea on how to get it?
> >
> > Arnaud :O)
> >
> > PS: I have a working version of my work at
> > http://pichery.dyndns.org/aspnet using the provided
> > Windows authentication mechanism and overloading it
> > with the form authentication mechanism. But I need to
> > wrap the whole into a IHttpModule and thus using the
> > provided Windows authentication mechanism is not an option.
> >
> >
> >
> >
>
>
- Next message: Joe Kaplan: "Re: VB .Net Security Question"
- Previous message: Tom: "Clear SSL state"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|