WCF Rest Web Services Authentication

I have created webservice REST Webservice in C # without any authentication. Now I am studying adding authentication to webservice. Webservice provides 6 methods (all of them are GET), of these 6 methods I want to restrict the access of two methods to a member of the Admin group. My web service is currently hosted on ConsoleHost. The consumer of this service will be in the same domain (usually another application), so if I can transfer the domain / username (Windows credentials) of the client to the web service. I can check with webservice to find out if this user is part of the "Admin" group or not.

My question is how can I pass the credentials for the client to enter the service. I think I could use an authentication header, but I did not find a good resource to learn about using authentication headers in REST Webservices. Are there other ways to authenticate a webservice user?

Once the web service is hosted, I can enter the URL of the service (for example, any other web page) in the browser and access the resource. How will authentication work in this case?

+7
source share
1 answer

Perhaps this guide will help you?

http://msdn.microsoft.com/en-us/library/dd203052.aspx

In particular, the section "Implementing Authentication and Authorization"

+4
source

All Articles