Stack Exchange
WCF method level security or exposure
I have a service,
[ServiceContract]
public interface IProduct
{
    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "/Products/Update")]
    void Update(Product product);

    [OperationContract]
    [WebInvoke(Method = "GET", UriTemplate = "/Products")]
    Product[] Get();
}

Now I only want a specific user in domain to be able to update products and call this method, only way I can thing of is in method itself check if logged in user is the user I want to give permissions, Is there any better way ?
Update(Product product)
{
   if (HttpContext.Current.User.Identity.Name == "Something")
   { 
       // update product
   }
}


do this help - https://msdn.microsoft.com/en-us/library/ms731200(v=vs.110).aspx ?

@AmitKumarGhosh excellent, that's what I was exactly after, please add as a answer and it will be accepted !

Glad I helped. It's long since We talked.

Well , you can use PriciplePermission attribute to allow specific users/groups access to specific resources. Internally ASP.Net Role provider is utilized.This attribute can be used at class level as well as on individual method(s).
For implementation details -
https://msdn.microsoft.com/en-us/library/ms731200(v=vs.110).aspx
