I have a API Action that will get requests from two different clients and these two clients will have different authentication mechanisms.
For these two authentication mechanisms I have implemented two action filters. Now I will add these action filters in the API action which will return the same data to both the clients.
I want the code to dynamically choose between the two action filters with respect to the clients. How can I do this ?
I got the below solution. This will go into both action and will check the client and ignore further process whichever is not needed.
http://forums.asp.net/t/1570772.aspx
But I am not sure if this is the only way or do we have a better way for this.
Thanks, R. Venkatesan