WCF Service Data Authorization Policy

I am using WCF Data Service and I need to implement authorization policies. Policies are dynamic and stored in a table containing the target table, field, and valid value. For this I am overriding the OnStartProcessingRequest DataService method, but I am trying to change the RequestUri, I am facing the "Unauthorization" problem. Is there a way to change the RequestUri parameter in the OnStartProcessingRequest method?

this code generates exeption

protected override void OnStartProcessingRequest(ProcessRequestArgs args) {
    Uri uri = new Uri(args.RequestUri + "?$filter=Id eq 3");
    args.RequestUri = uri;
}

      

I cannot use Interceptor because the system is dynamic and the entites are unknown.

The decision is currently made to apply filters in the client application (html5 / js) and check the filtering parameters on the server (in OnStartProcessingRequest).

I wonder if there is a way to add filter parameters to OnStartProcessingRequest or in any way that might solve this problem.

+3
filter uri dynamic authorization wcf


source to share


No one has answered this question yet

Check out similar questions:

731
Best Practices for Securing REST API / Web Service
557
Authentication versus authorization
394
REST / SOAP Endpoints for WCF Service
392
WCF vs ASP.NET Web API
382
WCF - How to Increase Post Size
344
What are the differences between WCF and ASMX Web Services?
206
How to return pure JSON from WCF service?
7
WCF Service Authorization Templates
0
Custom WCF Web Service Resolution
0
Create wcf service in IIS in code



All Articles
Loading...
X
Show
Funny
Dev
Pics