Hi
I've searched through this newsgroup but have been unable to find
something to answer my question so I'd better go ahead and post it
We are currently developing a web service for processing requests on a
business domain. We are interested in utilizing a custom authentication
against a user database so we are looking into the WSE 3.0 scenarios
and their samples. Once a user is authenticated the request is handled
if the user has sufficient priviliges and the actions are logged in an
audit trail.
What is puzzling me is how to inter-connect the authentication against
a user database with the actual code processing the request? That is,
how can I programmatically in the WebMethod get a hold of the
authenticated user (not the user running the web service on the
machine, but the user which was authenticated against the user
database).
I've looked into the Context object and even the Thread object, but I
can't seem to figure out what I need to do in my custom authentication
method to store some user-id/user object which can be retreived in the
WebMethod....
Any pointers on where to look or am I trying to do something that can't
be done?
John Saunders - 06 Oct 2006 18:36 GMT
> Hi
>
[quoted text clipped - 22 lines]
> Any pointers on where to look or am I trying to do something that can't
> be done?
I haven't tried this myself, but web services use the ASP.NET framework. So
take a look at Request.User and the IPrincipal and IIdentity interfaces.
John