If I have a type like:
public class Context
{
public Context()
{
}
public IQueryable<Record> Records
{
get
{
if (user == someone) //psuedocode
{
//return something
}
else
{
//return something else
}
}
}
}
that I am hosting in a DataService like this:
WebServiceHost host = new WebServiceHost(typeof(DataService<Context>, "http://localhost:43334/");
WebHttpBinding binding = new WebHttpBinding();
ServiceEndpoint endpoint = host.AddServiceEndpoint(
typeof(System.Data.Services.IRequestHandler), binding,
"folder");
host.Open();
How does one gain access to the supplied credentials from the client-side request? I know there are options to deny access, but how do i actually get the supplied credentials to determine whom to deny and/or what Records could be accessible by a given user? I feel like this is either really easy and I am missing something, or that I am barking up the wrong tree.