Reputation: 15925
I want to add some authentication to my odata service. Depending on the user calling i want to: filter rows and/or remove columns.
I read in scott hanselmans fine blogpost on odata ( http://www.hanselman.com/blog/CreatingAnODataAPIForStackOverflowIncludingXMLAndJSONIn30Minutes.aspx )that it is possible to intercept the incoming queries. If this works i could add some extra filtering.
How would this intercepting and altering queries work exactly? I can not find any examples of where and how to do this.
(i'm using entitie framework and wcf dataservices (just like scotts example blog)
Upvotes: 1
Views: 1636
Reputation: 8304
You use query interceptors for this.
http://msdn.microsoft.com/en-us/library/dd744837.aspx
Upvotes: 2