This project is read-only.

OWIN Authentication + Url Re-writing

Topics: ASP.NET Web API
Jan 20, 2014 at 4:22 AM
Is there a seam that gets executed after authentication, but before the controller gets created?

I am trying to re-route the call based on who is logged in. I can create a DelegatingHandler and change the RequestUrl, however the DelegatingHandler is fired before OWIN does any of its authentication, so at that point I don't know who is making the request.

The actual example that I have is as follows.
public class UsersController : ApiController {
   public UserInfo Get(string username) {

  public UserPersonalInfo GetPersonalInfo(string username){
I am trying to get "users/me" and "users/ChrisThomas" hit the same controller. Preferably I would like to avoid creating a separate controller or routes for the 'username' and 'me' versions.

Is this possible?